[][src]Trait terminus_store::layer::SubjectPredicateLookup

pub trait SubjectPredicateLookup {
    fn subject(&self) -> u64;
fn predicate(&self) -> u64;
fn objects(&self) -> Box<dyn Iterator<Item = u64>>;
fn has_pos_object_in_lookup(&self, object: u64) -> bool;
fn has_neg_object_in_lookup(&self, object: u64) -> bool;
fn has_object(&self, object: u64) -> bool; fn triples(&self) -> Box<dyn Iterator<Item = IdTriple>> { ... }
fn triple(&self, object: u64) -> Option<IdTriple> { ... } }

a trait that caches a lookup in a layer by subject and predicate.

This is returned by SubjectLookup::predicates and SubjectLookup::lookup_predicate. It stores slices of the relevant data structures to allow quick retrieval of objects when one already knows the subject and predicate.

Required methods

fn subject(&self) -> u64

The subject that this lookup is based on.

fn predicate(&self) -> u64

The predicate that this lookup is based on.

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

Returns an iterator over all objects that can be found by this lookup.

fn has_pos_object_in_lookup(&self, object: u64) -> bool

Returns true if the given object exists in the additions and false otherwise.

fn has_neg_object_in_lookup(&self, object: u64) -> bool

Returns true if the given object exists in the deletions and false otherwise.

fn has_object(&self, object: u64) -> bool

Returns true if the given object exists, and false otherwise.

Loading content...

Provided methods

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

Returns an iterator over all triples that can be found by this lookup.

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

Returns a triple for the given object, or None if it doesn't exist.

Loading content...

Implementors

impl SubjectPredicateLookup for GenericSubjectPredicateLookup[src]

Loading content...