#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let addr: String = "[::1]:50051".parse().unwrap();
let casbin = CasbinGRPC::default();
println!("Server listening on: {}", addr);
Server::builder()
.add_service(CasbinServer::new(casbin))
.serve(addr.parse().unwrap())
.await?;
Ok(())
}
error[E0277]: the trait bound `CasbinGRPC: proto::casbin_server::Casbin` is not satisfied
--> src/main.rs:29:40
|
29 | .add_service(CasbinServer::new(casbin))
| ----------------- ^^^^^^ the trait `proto::casbin_server::Casbin` is not implemented for `CasbinGRPC`
| |
| required by a bound introduced by this call
|
note: required by a bound in `proto::casbin_server::CasbinServer::<T>::new`
--> src/proto.rs:1164:13
|
1164 | impl<T: Casbin> CasbinServer<T> {
| ^^^^^^ required by this bound in `proto::casbin_server::CasbinServer::<T>::new`
1165 | pub fn new(inner: T) -> Self {
| --- required by a bound in this