Skip to main content

GraphEngineV1

Trait GraphEngineV1 

Source
pub trait GraphEngineV1:
    Send
    + Sync
    + 'static {
    // Required methods
    fn capabilities(&self) -> EngineCapabilities;
    fn cursor<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 StoreCtx<'life2>,
    ) -> Pin<Box<dyn Future<Output = Result<EngineCursor, GraphEngineError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn expand<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 StoreCtx<'life2>,
        req: ExpandRequest,
    ) -> Pin<Box<dyn Future<Output = Result<ExpandResponse, GraphEngineError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn shortest_path<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 StoreCtx<'life2>,
        req: ShortestPathRequest,
    ) -> Pin<Box<dyn Future<Output = Result<PathResponse, GraphEngineError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn match_pattern<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ctx: &'life1 StoreCtx<'life2>,
        req: PatternRequest,
    ) -> Pin<Box<dyn Future<Output = Result<PatternResponse, GraphEngineError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

The traversal-engine plugin contract (cpt-cf-graph-storage-contract-graph-engine-plugin).

Required Methods§

Source

fn capabilities(&self) -> EngineCapabilities

Source

fn cursor<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 StoreCtx<'life2>, ) -> Pin<Box<dyn Future<Output = Result<EngineCursor, GraphEngineError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn expand<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 StoreCtx<'life2>, req: ExpandRequest, ) -> Pin<Box<dyn Future<Output = Result<ExpandResponse, GraphEngineError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Directed one-hop expansion of an authorized frontier. Chained by the caller with per-hop dedup; the engine never expands beyond one hop, so budgets and authorization are re-evaluated between hops rather than inside an opaque traversal.

Source

fn shortest_path<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 StoreCtx<'life2>, req: ShortestPathRequest, ) -> Pin<Box<dyn Future<Output = Result<PathResponse, GraphEngineError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Declared capabilities only; otherwise GraphEngineError::Unsupported.

Source

fn match_pattern<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 StoreCtx<'life2>, req: PatternRequest, ) -> Pin<Box<dyn Future<Output = Result<PatternResponse, GraphEngineError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§