Skip to main content

GraphStore

Trait GraphStore 

Source
pub trait GraphStore: Send + Sync {
    // Required methods
    fn put_node<'life0, 'life1, 'async_trait>(
        &'life0 self,
        node: &'life1 Node,
    ) -> Pin<Box<dyn Future<Output = Result<NodeId, GrustError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn put_edge<'life0, 'life1, 'async_trait>(
        &'life0 self,
        edge: &'life1 Edge,
    ) -> Pin<Box<dyn Future<Output = Result<Option<EdgeId>, GrustError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_node<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 NodeId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Node>, GrustError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn get_edges<'life0, 'async_trait>(
        &'life0 self,
        query: EdgeQuery,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Edge>, GrustError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn traverse<'life0, 'async_trait>(
        &'life0 self,
        traversal: Traversal,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Node>, GrustError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;

    // Provided methods
    fn apply_schema<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _schema: &'life1 GraphSchema,
    ) -> Pin<Box<dyn Future<Output = Result<(), GrustError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait { ... }
    fn put_graph<'life0, 'life1, 'async_trait>(
        &'life0 self,
        graph: &'life1 Graph,
    ) -> Pin<Box<dyn Future<Output = Result<LoadReport, GrustError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait { ... }
    fn put_typed_graph<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        schema: &'life1 GraphSchema,
        graph: &'life2 Graph,
    ) -> Pin<Box<dyn Future<Output = Result<LoadReport, GrustError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait { ... }
}

Required Methods§

Source

fn put_node<'life0, 'life1, 'async_trait>( &'life0 self, node: &'life1 Node, ) -> Pin<Box<dyn Future<Output = Result<NodeId, GrustError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn put_edge<'life0, 'life1, 'async_trait>( &'life0 self, edge: &'life1 Edge, ) -> Pin<Box<dyn Future<Output = Result<Option<EdgeId>, GrustError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_node<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 NodeId, ) -> Pin<Box<dyn Future<Output = Result<Option<Node>, GrustError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_edges<'life0, 'async_trait>( &'life0 self, query: EdgeQuery, ) -> Pin<Box<dyn Future<Output = Result<Vec<Edge>, GrustError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn traverse<'life0, 'async_trait>( &'life0 self, traversal: Traversal, ) -> Pin<Box<dyn Future<Output = Result<Vec<Node>, GrustError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn apply_schema<'life0, 'life1, 'async_trait>( &'life0 self, _schema: &'life1 GraphSchema, ) -> Pin<Box<dyn Future<Output = Result<(), GrustError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn put_graph<'life0, 'life1, 'async_trait>( &'life0 self, graph: &'life1 Graph, ) -> Pin<Box<dyn Future<Output = Result<LoadReport, GrustError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn put_typed_graph<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, schema: &'life1 GraphSchema, graph: &'life2 Graph, ) -> Pin<Box<dyn Future<Output = Result<LoadReport, GrustError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§