Skip to main content

GraphStoreSampler

Trait GraphStoreSampler 

Source
pub trait GraphStoreSampler: Send + Sync {
    // Required methods
    fn vertex_ids(&self) -> Vec<u64>;
    fn outgoing_edges(&self, vid: u64) -> Vec<EdgeSample>;
    fn vertex_satisfies(&self, vid: u64, constraint: &VertexConstraint) -> bool;
}
Expand description

Minimal graph-store interface exposing the vertex, adjacency, and edge snapshots required by the sampler.

Required Methods§

Source

fn vertex_ids(&self) -> Vec<u64>

IDs of every vertex in the store.

Source

fn outgoing_edges(&self, vid: u64) -> Vec<EdgeSample>

Outgoing edges from vid.

Source

fn vertex_satisfies(&self, vid: u64, constraint: &VertexConstraint) -> bool

Apply a vertex-constraint callback so the sampler can keep vertex storage behind the store implementation.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§