pub struct Properties<T, B, M = ()>(_);
Expand description
Properties of a node object, and their associated objects.
Implementations
sourceimpl<T, B, M> Properties<T, B, M>
impl<T, B, M> Properties<T, B, M>
sourcepub fn iter(&self) -> Iter<'_, T, B, M>ⓘNotable traits for Iter<'a, T, B, M>impl<'a, T, B, M> Iterator for Iter<'a, T, B, M> type Item = (Meta<&'a Id<T, B>, &'a M>, &'a [Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>]);
pub fn iter(&self) -> Iter<'_, T, B, M>ⓘNotable traits for Iter<'a, T, B, M>impl<'a, T, B, M> Iterator for Iter<'a, T, B, M> type Item = (Meta<&'a Id<T, B>, &'a M>, &'a [Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>]);
Returns an iterator over the properties and their associated objects.
sourcepub fn iter_mut(&mut self) -> IterMut<'_, T, B, M>ⓘNotable traits for IterMut<'a, T, B, M>impl<'a, T, B, M> Iterator for IterMut<'a, T, B, M> type Item = (Meta<&'a Id<T, B>, &'a mut M>, &'a mut Multiset<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, DeterministicHasherBuilder>);
pub fn iter_mut(&mut self) -> IterMut<'_, T, B, M>ⓘNotable traits for IterMut<'a, T, B, M>impl<'a, T, B, M> Iterator for IterMut<'a, T, B, M> type Item = (Meta<&'a Id<T, B>, &'a mut M>, &'a mut Multiset<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, DeterministicHasherBuilder>);
Returns an iterator over the properties with a mutable reference to their associated objects.
sourceimpl<T, B, M> Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
sourcepub fn contains<Q>(&self, prop: Q) -> boolwhere
Q: IntoId<T, B>,
pub fn contains<Q>(&self, prop: Q) -> boolwhere
Q: IntoId<T, B>,
Checks if the given property is associated to any object.
sourcepub fn get<Q>(&self, prop: Q) -> Objects<'_, T, B, M>ⓘNotable traits for Objects<'a, T, B, M>impl<'a, T, B, M> Iterator for Objects<'a, T, B, M> type Item = &'a Meta<Indexed<Object<T, B, M>, M>, M>;
where
Q: IntoId<T, B>,
pub fn get<Q>(&self, prop: Q) -> Objects<'_, T, B, M>ⓘNotable traits for Objects<'a, T, B, M>impl<'a, T, B, M> Iterator for Objects<'a, T, B, M> type Item = &'a Meta<Indexed<Object<T, B, M>, M>, M>;
where
Q: IntoId<T, B>,
Returns an iterator over all the objects associated to the given property.
sourcepub fn get_any<Q>(
&self,
prop: Q
) -> Option<&Meta<Indexed<Object<T, B, M>, M>, M>>where
Q: IntoId<T, B>,
pub fn get_any<Q>(
&self,
prop: Q
) -> Option<&Meta<Indexed<Object<T, B, M>, M>, M>>where
Q: IntoId<T, B>,
Get one of the objects associated to the given property.
If multiple objects are found, there are no guaranties on which object will be returned.
sourcepub fn insert(
&mut self,
Meta<Id<T, B>, M>,
value: Meta<Indexed<Object<T, B, M>, M>, M>
)
pub fn insert(
&mut self,
Meta<Id<T, B>, M>,
value: Meta<Indexed<Object<T, B, M>, M>, M>
)
Associate the given object to the node through the given property.
sourcepub fn insert_unique(
&mut self,
Meta<Id<T, B>, M>,
value: Meta<Indexed<Object<T, B, M>, M>, M>
)
pub fn insert_unique(
&mut self,
Meta<Id<T, B>, M>,
value: Meta<Indexed<Object<T, B, M>, M>, M>
)
Associate the given object to the node through the given property, unless it is already.
sourcepub fn insert_all<Objects>(&mut self, Meta<Id<T, B>, M>, values: Objects)where
Objects: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
pub fn insert_all<Objects>(&mut self, Meta<Id<T, B>, M>, values: Objects)where
Objects: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
Associate all the given objects to the node through the given property.
sourcepub fn insert_all_unique_stripped<Objects>(
&mut self,
Meta<Id<T, B>, M>,
values: Objects
)where
Objects: IntoIterator<Item = Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>,
pub fn insert_all_unique_stripped<Objects>(
&mut self,
Meta<Id<T, B>, M>,
values: Objects
)where
Objects: IntoIterator<Item = Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>,
Associate all the given objects to the node through the given property, unless it is already.
The equivalence operator is used to remove equivalent objects.
sourcepub fn insert_all_unique<Objects>(
&mut self,
prop: Meta<Id<T, B>, M>,
values: Objects
)where
Objects: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
pub fn insert_all_unique<Objects>(
&mut self,
prop: Meta<Id<T, B>, M>,
values: Objects
)where
Objects: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
Associate all the given objects to the node through the given property, unless it is already.
The equivalence operator is used to remove equivalent objects.
pub fn extend_unique<I, O>(&mut self, iter: I)where
I: IntoIterator<Item = (Meta<Id<T, B>, M>, O)>,
O: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
pub fn extend_unique_stripped<I, O>(&mut self, iter: I)where
I: IntoIterator<Item = (Meta<Id<T, B>, M>, O)>,
O: IntoIterator<Item = Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>,
Trait Implementations
sourceimpl<T, B, M> Clone for Properties<T, B, M>where
T: Clone,
B: Clone,
M: Clone,
impl<T, B, M> Clone for Properties<T, B, M>where
T: Clone,
B: Clone,
M: Clone,
sourcefn clone(&self) -> Properties<T, B, M>
fn clone(&self) -> Properties<T, B, M>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<T, B, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Object<T, B, M>, M>, M>, Global>)> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Object<T, B, M>, M>, M>, Global>)> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
sourcefn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (Meta<Id<T, B>, M>, Vec<Meta<Indexed<Object<T, B, M>, M>, M>, Global>)>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (Meta<Id<T, B>, M>, Vec<Meta<Indexed<Object<T, B, M>, M>, M>, Global>)>,
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)sourceimpl<'a, T, B, M> IntoIterator for &'a Properties<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a Properties<T, B, M>
sourceimpl<'a, T, B, M> IntoIterator for &'a mut Properties<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a mut Properties<T, B, M>
type Item = (Meta<&'a Id<T, B>, &'a mut M>, &'a mut Multiset<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, DeterministicHasherBuilder>)
type Item = (Meta<&'a Id<T, B>, &'a mut M>, &'a mut Multiset<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, DeterministicHasherBuilder>)
sourcefn into_iter(self) -> <&'a mut Properties<T, B, M> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut Properties<T, B, M> as IntoIterator>::IntoIter
sourceimpl<T, B, M> IntoIterator for Properties<T, B, M>
impl<T, B, M> IntoIterator for Properties<T, B, M>
type Item = (Meta<Id<T, B>, M>, Multiset<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, DeterministicHasherBuilder>)
type Item = (Meta<Id<T, B>, M>, Multiset<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, DeterministicHasherBuilder>)
sourcefn into_iter(self) -> <Properties<T, B, M> as IntoIterator>::IntoIter
fn into_iter(self) -> <Properties<T, B, M> as IntoIterator>::IntoIter
sourceimpl<T, B, M> MappedEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> MappedEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
sourceimpl<T, B, M> PartialEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
M: PartialEq<M>,
impl<T, B, M> PartialEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
M: PartialEq<M>,
sourcefn eq(&self, other: &Properties<T, B, M>) -> bool
fn eq(&self, other: &Properties<T, B, M>) -> bool
sourceimpl<T, B, M> StrippedHash for Properties<T, B, M>where
T: Hash,
B: Hash,
impl<T, B, M> StrippedHash for Properties<T, B, M>where
T: Hash,
B: Hash,
fn stripped_hash<H>(&self, h: &mut H)where
H: Hasher,
sourceimpl<T, B, M> StrippedPartialEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> StrippedPartialEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
fn stripped_eq(&self, other: &Properties<T, B, M>) -> bool
sourceimpl<T, B, M> TryFromJson<T, B, M> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> TryFromJson<T, B, M> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
fn try_from_json_in(
vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>,
Meta<Value<M>, M>
) -> Result<Meta<Properties<T, B, M>, M>, Meta<InvalidExpandedJson<M>, M>>
sourceimpl<T, B, M> TryFromJsonObject<T, B, M> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> TryFromJsonObject<T, B, M> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
fn try_from_json_object_in(
vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>,
Meta<Object<M>, M>
) -> Result<Meta<Properties<T, B, M>, M>, Meta<InvalidExpandedJson<M>, M>>
impl<T, B, M> Eq for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
M: Eq,
impl<T, B, M> StrippedEq for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
Auto Trait Implementations
impl<T, B, M> RefUnwindSafe for Properties<T, B, M>where
B: RefUnwindSafe,
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B, M> Send for Properties<T, B, M>where
B: Send,
M: Send,
T: Send,
impl<T, B, M> Sync for Properties<T, B, M>where
B: Sync,
M: Sync,
T: Sync,
impl<T, B, M> Unpin for Properties<T, B, M>where
B: Unpin,
M: Unpin,
T: Unpin,
impl<T, B, M> UnwindSafe for Properties<T, B, M>where
B: UnwindSafe,
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> BorrowStripped for T
impl<T> BorrowStripped for T
sourceimpl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.