Struct owoof::retrieve::NamedNetwork
source · [−]pub struct NamedNetwork<'n, V> {
pub network: GenericNetwork<V>,
pub names: Names<'n>,
}
Expand description
A GenericNetwork
paired with Names
to associate variables to
their first occurrence in a network.
Fields
network: GenericNetwork<V>
names: Names<'n>
Implementations
sourceimpl<'n, V> NamedNetwork<'n, V>
impl<'n, V> NamedNetwork<'n, V>
pub fn new(network: GenericNetwork<V>, names: Names<'n>) -> Self
pub fn split(self) -> (GenericNetwork<V>, Names<'n>)
sourceimpl<'n, 'v> NamedNetwork<'n, ValueRef<'v>>
impl<'n, 'v> NamedNetwork<'n, ValueRef<'v>>
sourcepub fn add_pattern<V>(&mut self, pattern: &'v Pattern<'n, V>) -> Triples where
ValueRef<'v>: From<&'v V>,
pub fn add_pattern<V>(&mut self, pattern: &'v Pattern<'n, V>) -> Triples where
ValueRef<'v>: From<&'v V>,
Constrain a GenericNetwork
using the given Pattern
, unifying variables where
appropriate.
Methods from Deref<Target = GenericNetwork<V>>
sourcepub fn add_triples(&mut self) -> Triples
pub fn add_triples(&mut self) -> Triples
Adds one group of entity-attribute-value triples that can be constrained with values or by fields on other triples groups.
sourcepub fn constrain(&mut self, c: Constraint<V>)
pub fn constrain(&mut self, c: Constraint<V>)
Adds a Constraint
.
sourcepub fn add_constraint(&mut self, c: Constraint<V>)
pub fn add_constraint(&mut self, c: Constraint<V>)
Adds a Constraint
.
pub fn constraints(&self) -> &[Constraint<V>]
pub fn constraints_mut(&mut self) -> &mut [Constraint<V>]
pub fn fluent_triples(&mut self) -> FluentTriples<'_, V>
pub fn prefetch_attributes(&mut self, woof: &DontWoof<'_>) -> Result<()>
sourcepub fn this_and_links_to(
&self,
on: TriplesField
) -> impl Iterator<Item = TriplesField> + '_
pub fn this_and_links_to(
&self,
on: TriplesField
) -> impl Iterator<Item = TriplesField> + '_
Shorthand for iter::once(field).chain(network.links_to(field))
.
sourcepub fn links_to(
&self,
on: TriplesField
) -> impl Iterator<Item = TriplesField> + '_
pub fn links_to(
&self,
on: TriplesField
) -> impl Iterator<Item = TriplesField> + '_
All TriplesField
with equality constraints to the given TriplesField
.
pub fn constraints_on(
&self,
on: TriplesField
) -> impl Iterator<Item = &Constraint<V>> + '_
sourcepub fn is_linked(
&self,
a: TriplesField,
b: TriplesField
) -> Option<&Constraint<V>>
pub fn is_linked(
&self,
a: TriplesField,
b: TriplesField
) -> Option<&Constraint<V>>
Find an equality constraint between these two fields.
sourcepub fn is_matched<I: Into<V>>(
&self,
a: TriplesField,
v: I
) -> Option<&Constraint<V>>
pub fn is_matched<I: Into<V>>(
&self,
a: TriplesField,
v: I
) -> Option<&Constraint<V>>
Find an equality constraint between a field and a value.
pub fn constraint_value_matches(
&self,
v: V
) -> impl Iterator<Item = TriplesField> + '_
sourcepub fn value_for_entity_attribute<A: Clone>(
&mut self,
entity: TriplesField,
attribute: A
) -> TriplesField where
A: AsRef<AttributeRef>,
V: From<A>,
pub fn value_for_entity_attribute<A: Clone>(
&mut self,
entity: TriplesField,
attribute: A
) -> TriplesField where
A: AsRef<AttributeRef>,
V: From<A>,
Find or add triples t
such that t.e = field
and t.a = attribute
.
Trait Implementations
sourceimpl<'n, V: Debug> Debug for NamedNetwork<'n, V>
impl<'n, V: Debug> Debug for NamedNetwork<'n, V>
sourceimpl<'n, V> Default for NamedNetwork<'n, V>
impl<'n, V> Default for NamedNetwork<'n, V>
sourceimpl<'n, V> Deref for NamedNetwork<'n, V>
impl<'n, V> Deref for NamedNetwork<'n, V>
type Target = GenericNetwork<V>
type Target = GenericNetwork<V>
The resulting type after dereferencing.
Auto Trait Implementations
impl<'n, V> RefUnwindSafe for NamedNetwork<'n, V> where
V: RefUnwindSafe,
impl<'n, V> Send for NamedNetwork<'n, V> where
V: Send,
impl<'n, V> Sync for NamedNetwork<'n, V> where
V: Sync,
impl<'n, V> Unpin for NamedNetwork<'n, V> where
V: Unpin,
impl<'n, V> UnwindSafe for NamedNetwork<'n, V> where
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more