pub trait GraphService:
Send
+ Sync
+ 'static {
type WatchGraphStream: Stream<Item = Result<GraphEvent, Status>> + Send + 'static;
// Required methods
fn get_graph<'life0, 'async_trait>(
&'life0 self,
request: Request<GetGraphRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetGraphResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_node<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetNodeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search_nodes<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchNodesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SearchNodesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shortest_path<'life0, 'async_trait>(
&'life0 self,
request: Request<ShortestPathRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ShortestPathResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn watch_graph<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchGraphRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchGraphStream>, 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 GraphServiceServer.
Required Associated Types§
Sourcetype WatchGraphStream: Stream<Item = Result<GraphEvent, Status>> + Send + 'static
type WatchGraphStream: Stream<Item = Result<GraphEvent, Status>> + Send + 'static
Server streaming response type for the WatchGraph method.
Required Methods§
fn get_graph<'life0, 'async_trait>(
&'life0 self,
request: Request<GetGraphRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetGraphResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_node<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetNodeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn search_nodes<'life0, 'async_trait>(
&'life0 self,
request: Request<SearchNodesRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SearchNodesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shortest_path<'life0, 'async_trait>(
&'life0 self,
request: Request<ShortestPathRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ShortestPathResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn watch_graph<'life0, 'async_trait>(
&'life0 self,
request: Request<WatchGraphRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::WatchGraphStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".