pub struct GenericNetwork<V> { /* private fields */ }
Expand description
A plan or projection of entity-attribute-value sets with constraints between them.
- See
Network
for type alias that borrows usingValueRef
. - Or
OwnedNetwork
for a type alias that owns usingValue
.
Implementations§
Source§impl<V> GenericNetwork<V>
impl<V> 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>
Source§impl<V> GenericNetwork<V>
impl<V> GenericNetwork<V>
pub fn prefetch_attributes(&mut self, woof: &DontWoof<'_>) -> Result<()>
Source§impl<V> GenericNetwork<V>where
V: PartialEq,
impl<V> GenericNetwork<V>where
V: PartialEq,
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>(
&mut self,
entity: TriplesField,
attribute: A,
) -> TriplesField
pub fn value_for_entity_attribute<A>( &mut self, entity: TriplesField, attribute: A, ) -> TriplesField
Find or add triples t
such that t.e = field
and t.a = attribute
.
Trait Implementations§
Source§impl<V: Clone> Clone for GenericNetwork<V>
impl<V: Clone> Clone for GenericNetwork<V>
Source§fn clone(&self) -> GenericNetwork<V>
fn clone(&self) -> GenericNetwork<V>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<V: Debug> Debug for GenericNetwork<V>
impl<V: Debug> Debug for GenericNetwork<V>
Source§impl<V> Default for GenericNetwork<V>
impl<V> Default for GenericNetwork<V>
Source§impl<'n, V> From<&'n GenericNetwork<V>> for Select<'n, V>
impl<'n, V> From<&'n GenericNetwork<V>> for Select<'n, V>
Source§fn from(network: &'n GenericNetwork<V>) -> Self
fn from(network: &'n GenericNetwork<V>) -> Self
Converts to this type from the input type.
Source§impl<V: PartialEq> PartialEq for GenericNetwork<V>
impl<V: PartialEq> PartialEq for GenericNetwork<V>
impl<V> StructuralPartialEq for GenericNetwork<V>
Auto Trait Implementations§
impl<V> Freeze for GenericNetwork<V>
impl<V> RefUnwindSafe for GenericNetwork<V>where
V: RefUnwindSafe,
impl<V> Send for GenericNetwork<V>where
V: Send,
impl<V> Sync for GenericNetwork<V>where
V: Sync,
impl<V> Unpin for GenericNetwork<V>where
V: Unpin,
impl<V> UnwindSafe for GenericNetwork<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more