[][src]Trait terminus_store::layer::LayerSubjectLookup

pub trait LayerSubjectLookup {
    fn subject(&self) -> u64;
fn predicates(
        &self
    ) -> Box<dyn Iterator<Item = Box<dyn LayerSubjectPredicateLookup>>>;
fn lookup_predicate(
        &self,
        predicate: u64
    ) -> Option<Box<dyn LayerSubjectPredicateLookup>>; fn triples(&self) -> Box<dyn Iterator<Item = IdTriple>> { ... } }

A trait that caches a lookup in a layer by subject, but only for that layer and not its parents.

This is returned by Layer::subjects and Layer::lookup_subject. It stores slices of the relevant data structures to allow quick retrieval of predicate-object pairs when one already knows the subject.

Required methods

fn subject(&self) -> u64

The subject that this lookup is based on

fn predicates(
    &self
) -> Box<dyn Iterator<Item = Box<dyn LayerSubjectPredicateLookup>>>

Returns an iterator over predicate lookups

fn lookup_predicate(
    &self,
    predicate: u64
) -> Option<Box<dyn LayerSubjectPredicateLookup>>

Returns a predicate lookup for the given predicate, or None if no such lookup could be constructed

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

Loading content...

Implementors

Loading content...