Skip to main content

DynGraphSaver

Trait DynGraphSaver 

Source
pub trait DynGraphSaver: Send + Sync {
    // Required method
    fn save_graph_dyn<'a>(
        &'a self,
        ctx: &'a UserContext,
        entity: &'a str,
        node: GraphNode,
    ) -> Pin<Box<dyn Future<Output = Result<GraphNode, RuntimeError>> + Send + 'a>>;
}
Expand description

Object-safe trait for saving a GraphNode tree to the database.

A concrete implementation is registered in UserContext during setup so that [Audited::save] can persist entities without exposing the underlying executor type to business code.

Required Methods§

Source

fn save_graph_dyn<'a>( &'a self, ctx: &'a UserContext, entity: &'a str, node: GraphNode, ) -> Pin<Box<dyn Future<Output = Result<GraphNode, RuntimeError>> + Send + 'a>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§