Skip to main content

PropertyGraphReader

Trait PropertyGraphReader 

Source
pub trait PropertyGraphReader<NodeKey, Node, EdgeKey, Edge, PropKey, Prop, E> {
    // Required methods
    fn nodes(
        &self,
        filter: PropertyFilter<PropKey>,
    ) -> Result<impl Iterator<Item = NodeKey>, E>;
    fn edges(
        &self,
        filter: PropertyFilter<PropKey>,
    ) -> Result<impl Iterator<Item = EdgeKey>, E>;
    fn properties(
        &self,
        filter: PropertyFilter<PropKey>,
    ) -> Result<impl Iterator<Item = PropKey>, E>;
    fn read_node(&self, id: NodeKey) -> Result<Node, E>;
    fn read_edge(&self, id: &EdgeKey) -> Result<Edge, E>;
    fn read_property(&self, id: &PropKey) -> Result<Prop, E>;
}
Expand description

Low level reading and traversing interface for a graph

Required Methods§

Source

fn nodes( &self, filter: PropertyFilter<PropKey>, ) -> Result<impl Iterator<Item = NodeKey>, E>

List nodes

Source

fn edges( &self, filter: PropertyFilter<PropKey>, ) -> Result<impl Iterator<Item = EdgeKey>, E>

List edges

Source

fn properties( &self, filter: PropertyFilter<PropKey>, ) -> Result<impl Iterator<Item = PropKey>, E>

List properties

Source

fn read_node(&self, id: NodeKey) -> Result<Node, E>

Get a node by its key

Source

fn read_edge(&self, id: &EdgeKey) -> Result<Edge, E>

Get an edge by its key

Source

fn read_property(&self, id: &PropKey) -> Result<Prop, E>

Get a property by its key

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§