Struct owoof::network::GenericNetwork
source · [−]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
sourceimpl<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>
sourceimpl<V> GenericNetwork<V> where
V: TypeTag + ToSql,
impl<V> GenericNetwork<V> where
V: TypeTag + ToSql,
pub fn prefetch_attributes(&mut self, woof: &DontWoof<'_>) -> Result<()>
sourceimpl<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: 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
.
sourceimpl<'n, V> GenericNetwork<V>
impl<'n, V> GenericNetwork<V>
Trait Implementations
sourceimpl<V: Clone> Clone for GenericNetwork<V>
impl<V: Clone> Clone for GenericNetwork<V>
sourcefn clone(&self) -> GenericNetwork<V>
fn clone(&self) -> GenericNetwork<V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<V: Debug> Debug for GenericNetwork<V>
impl<V: Debug> Debug for GenericNetwork<V>
sourceimpl<V> Default for GenericNetwork<V>
impl<V> Default for GenericNetwork<V>
sourceimpl<'n, V> From<&'n GenericNetwork<V>> for Select<'n, V>
impl<'n, V> From<&'n GenericNetwork<V>> for Select<'n, V>
sourcefn from(network: &'n GenericNetwork<V>) -> Self
fn from(network: &'n GenericNetwork<V>) -> Self
Performs the conversion.
sourceimpl<V: PartialEq> PartialEq<GenericNetwork<V>> for GenericNetwork<V>
impl<V: PartialEq> PartialEq<GenericNetwork<V>> for GenericNetwork<V>
sourcefn eq(&self, other: &GenericNetwork<V>) -> bool
fn eq(&self, other: &GenericNetwork<V>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GenericNetwork<V>) -> bool
fn ne(&self, other: &GenericNetwork<V>) -> bool
This method tests for !=
.
impl<V> StructuralPartialEq for GenericNetwork<V>
Auto Trait Implementations
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
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more