pub trait ContextPlugin:
Send
+ Sync
+ 'static {
// Required methods
fn register_app<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterAppRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterAppResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn unregister_app<'life0, 'async_trait>(
&'life0 self,
request: Request<UnregisterAppRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UnregisterAppResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_context<'life0, 'async_trait>(
&'life0 self,
request: Request<GetContextRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AppContext>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with ContextPluginServer.
Required Methods§
Sourcefn register_app<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterAppRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterAppResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn register_app<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterAppRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterAppResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
This method gets invoked whenever we install or change an app that has a permission this plugin cares about.
fn unregister_app<'life0, 'async_trait>(
&'life0 self,
request: Request<UnregisterAppRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<UnregisterAppResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Sourcefn get_context<'life0, 'async_trait>(
&'life0 self,
request: Request<GetContextRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AppContext>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_context<'life0, 'async_trait>(
&'life0 self,
request: Request<GetContextRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<AppContext>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
This method gets invoked whenever we need to render a template that uses this plugin.