pub trait UserService:
Send
+ Sync
+ 'static {
// Required methods
fn create_user<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CreateUserResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn drop_user<'life0, 'async_trait>(
&'life0 self,
request: Request<DropUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DropUserResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_user<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UpdateUserResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn grant_privilege<'life0, 'async_trait>(
&'life0 self,
request: Request<GrantPrivilegeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GrantPrivilegeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn revoke_privilege<'life0, 'async_trait>(
&'life0 self,
request: Request<RevokePrivilegeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RevokePrivilegeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with UserServiceServer.
Required Methods§
fn create_user<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CreateUserResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn drop_user<'life0, 'async_trait>(
&'life0 self,
request: Request<DropUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<DropUserResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_user<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateUserRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UpdateUserResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn grant_privilege<'life0, 'async_trait>(
&'life0 self,
request: Request<GrantPrivilegeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GrantPrivilegeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn grant_privilege<'life0, 'async_trait>(
&'life0 self,
request: Request<GrantPrivilegeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GrantPrivilegeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
GrantPrivilege grants a privilege to a user.
sourcefn revoke_privilege<'life0, 'async_trait>(
&'life0 self,
request: Request<RevokePrivilegeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RevokePrivilegeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn revoke_privilege<'life0, 'async_trait>(
&'life0 self,
request: Request<RevokePrivilegeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RevokePrivilegeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
RevokePrivilege revokes a privilege from a user.