Comments (7)
from examples.
@eagleshine you should use actor: web::Data<Addr<CasbinActor<CachedEnforcer>>>,
from examples.
Looks like the text is changed by github, corrected as below:
error[E0277]: the trait bound CasbinActor<CachedEnforcer>: Actor
is not satisfied
--> actix-middleware-example/src/api/user.rs:34:12
|
34 | actor: web::Data<Addr<CasbinActor < CachedEnforcer >>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait Actor
is not implemented for CasbinActor<CachedEnforcer>
|
|
from examples.
This issue is still there. Doesn't look like a old dependency problem. I cloned the repo, as is, set up the .env. secret.key and the db, and still this error occurred.
This maybe because Actor
is not implemented for CasbinActor<T>
where T: CachedEnforcer
in actix-casbin
from examples.
This issue is still there. Doesn't look like a old dependency problem. I cloned the repo, as is, set up the .env. secret.key and the db, and still this error occurred.
This maybe becauseActor
is not implemented forCasbinActor<T>
whereT: CachedEnforcer
in actix-casbin
@hackerchai can you check this?
from examples.
@eagleshine It is a dependency problem caused by the dependendabot. Because we're still waiting for actix-web 4.x stable, we have to use the old versions of actix-web and actix-rt
use this Cargo.toml -
[dependencies]
http = "0.2.1"
actix = "0.10.0"
actix-web = "3.0.2"
actix-service = "1.0.6"
actix-rt = "1.1.1"
actix-cors = "0.4.0"
futures = "0.3.5"
failure = "0.1.8"
serde = "1.0.116"
serde_derive = "1.0.116"
serde_json = "1.0.57"
derive_more = "0.99.10"
chrono = { version = "0.4.18", features = ["serde"] }
diesel = { version = "1.4.5", features = ["postgres","r2d2", "chrono"] }
diesel_migrations = "1.4.0"
dotenv = "0.15.0"
env_logger = "0.8.1"
log = "0.4.11"
jsonwebtoken = "7.2.0"
bcrypt = "0.9.0"
csv = "1.1.3"
walkdir = "2.3.1"
actix-casbin= {version = "0.4.2", default-features = false, features = [ "runtime-async-std" ]}
actix-casbin-auth = {version = "0.4.4", default-features = false, features = [ "runtime-async-std" ]}
diesel-adapter = { version = "0.8.1", default-features = false, features = ["postgres","runtime-async-std"] }
uuid = {version = "0.8.1", features = ["v4"] }
from examples.
@hsluoyz this issue can be closed.
from examples.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from examples.