Skip to main content

GraphStore

Trait GraphStore 

Source
pub trait GraphStore {
    // Required methods
    fn stats(&self) -> GraphStoreStats;
    fn observability(&self) -> GraphStoreObservability;
    fn root_id(&self) -> BlockId;
    fn node_ids(&self) -> Vec<BlockId>;
    fn node(&self, block_id: BlockId) -> Option<GraphNodeRecord>;
    fn children(&self, block_id: BlockId) -> Vec<BlockId>;
    fn parent(&self, block_id: BlockId) -> Option<BlockId>;
    fn outgoing_edges(&self, block_id: BlockId) -> Vec<GraphEdgeSummary>;
    fn incoming_edges(&self, block_id: BlockId) -> Vec<GraphEdgeSummary>;
    fn resolve_selector(&self, selector: &str) -> Option<BlockId>;
    fn to_portable_document(&self) -> Result<PortableDocument, GraphStoreError>;
}

Required Methods§

Implementors§