Skip to main content

GraphService

Trait GraphService 

Source
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§

Source

type WatchGraphStream: Stream<Item = Result<GraphEvent, Status>> + Send + 'static

Server streaming response type for the WatchGraph method.

Required Methods§

Source

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,

Source

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,

Source

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,

Source

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,

Source

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".

Implementors§