[][src]Trait terminus_store::layer::LayerObjectLookup

pub trait LayerObjectLookup {
    fn object(&self) -> u64;
fn subject_predicate_pairs(&self) -> Box<dyn Iterator<Item = (u64, u64)>>; fn has_subject_predicate_pair(&self, subject: u64, predicate: u64) -> bool { ... }
fn triple(&self, subject: u64, predicate: u64) -> Option<IdTriple> { ... }
fn triples(&self) -> Box<dyn Iterator<Item = IdTriple>> { ... } }

a trait that caches a lookup by object in a single layer's addition or removals.

Required methods

fn object(&self) -> u64

The object that this lookup is based on.

fn subject_predicate_pairs(&self) -> Box<dyn Iterator<Item = (u64, u64)>>

Returns an iterator over the subject-predicate pairs pointing at this object.

Loading content...

Provided methods

fn has_subject_predicate_pair(&self, subject: u64, predicate: u64) -> bool

Returns true if the object this lookup is for is connected to the given subject and predicater.

fn triple(&self, subject: u64, predicate: u64) -> Option<IdTriple>

Returns the triple consisting of the given subject and predicate, and the object this lookup is for, if it exists. None is returned otherwise.

fn triples(&self) -> Box<dyn Iterator<Item = IdTriple>>

Returns an iterator over all triples with the object of this lookup.

Loading content...

Implementors

Loading content...