pub struct Properties<T, B>(/* private fields */);
Expand description
Properties of a node object, and their associated objects.
Implementations§
Source§impl<T, B> Properties<T, B>
impl<T, B> Properties<T, B>
Sourcepub fn new() -> Properties<T, B>
pub fn new() -> Properties<T, B>
Creates an empty map.
Sourcepub fn iter(&self) -> Iter<'_, T, B> ⓘ
pub fn iter(&self) -> Iter<'_, T, B> ⓘ
Returns an iterator over the properties and their associated objects.
Source§impl<T, B> Properties<T, B>
impl<T, B> Properties<T, B>
Sourcepub fn contains<Q>(&self, prop: &Q) -> bool
pub fn contains<Q>(&self, prop: &Q) -> bool
Checks if the given property is associated to any object.
Sourcepub fn get<Q>(&self, prop: &Q) -> Objects<'_, T, B> ⓘ
pub fn get<Q>(&self, prop: &Q) -> Objects<'_, T, B> ⓘ
Returns an iterator over all the objects associated to the given property.
Sourcepub fn get_any<Q>(&self, prop: &Q) -> Option<&Indexed<Object<T, B>>>
pub fn get_any<Q>(&self, prop: &Q) -> Option<&Indexed<Object<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, prop: Id<T, B>, value: Indexed<Object<T, B>>)
pub fn insert(&mut self, prop: Id<T, B>, value: Indexed<Object<T, B>>)
Associate the given object to the node through the given property with metadata.
Sourcepub fn insert_unique(&mut self, prop: Id<T, B>, value: Indexed<Object<T, B>>)
pub fn insert_unique(&mut self, prop: Id<T, B>, value: Indexed<Object<T, B>>)
Associate the given object to the node through the given property, unless it is already.
Sourcepub fn insert_all<Objects>(&mut self, prop: Id<T, B>, values: Objects)
pub fn insert_all<Objects>(&mut self, prop: Id<T, B>, values: Objects)
Associate all the given objects to the node through the given property.
Sourcepub fn insert_all_unique<Objects>(&mut self, prop: Id<T, B>, values: Objects)
pub fn insert_all_unique<Objects>(&mut self, prop: Id<T, B>, values: Objects)
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 set(&mut self, prop: Id<T, B>, values: Multiset<Indexed<Object<T, B>>>)
pub fn extend_unique<I, O>(&mut self, iter: I)
Trait Implementations§
Source§impl<T, B> Clone for Properties<T, B>
impl<T, B> Clone for Properties<T, B>
Source§fn clone(&self) -> Properties<T, B>
fn clone(&self) -> Properties<T, B>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T, B> Debug for Properties<T, B>
impl<T, B> Debug for Properties<T, B>
Source§impl<T, B> Default for Properties<T, B>
impl<T, B> Default for Properties<T, B>
Source§fn default() -> Properties<T, B>
fn default() -> Properties<T, B>
Source§impl<T, B> Extend<(Id<T, B>, Vec<Indexed<Object<T, B>>>)> for Properties<T, B>
impl<T, B> Extend<(Id<T, B>, Vec<Indexed<Object<T, B>>>)> for Properties<T, B>
Source§fn extend<I>(&mut self, iter: I)
fn extend<I>(&mut self, iter: I)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl<T, B, O> FromIterator<(Id<T, B>, O)> for Properties<T, B>
impl<T, B, O> FromIterator<(Id<T, B>, O)> for Properties<T, B>
Source§fn from_iter<I>(iter: I) -> Properties<T, B>where
I: IntoIterator<Item = (Id<T, B>, O)>,
fn from_iter<I>(iter: I) -> Properties<T, B>where
I: IntoIterator<Item = (Id<T, B>, O)>,
Source§impl<T, B> Hash for Properties<T, B>
impl<T, B> Hash for Properties<T, B>
Source§impl<'a, T, B> IntoIterator for &'a Properties<T, B>
impl<'a, T, B> IntoIterator for &'a Properties<T, B>
Source§impl<'a, T, B> IntoIterator for &'a mut Properties<T, B>
impl<'a, T, B> IntoIterator for &'a mut Properties<T, B>
Source§type Item = (&'a Id<T, B>, &'a mut Multiset<Indexed<Object<T, B>>>)
type Item = (&'a Id<T, B>, &'a mut Multiset<Indexed<Object<T, B>>>)
Source§type IntoIter = IterMut<'a, Id<T, B>, Multiset<Indexed<Object<T, B>>>>
type IntoIter = IterMut<'a, Id<T, B>, Multiset<Indexed<Object<T, B>>>>
Source§fn into_iter(self) -> <&'a mut Properties<T, B> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut Properties<T, B> as IntoIterator>::IntoIter
Source§impl<T, B> IntoIterator for Properties<T, B>
impl<T, B> IntoIterator for Properties<T, B>
Source§type Item = (Id<T, B>, Multiset<Indexed<Object<T, B>>>)
type Item = (Id<T, B>, Multiset<Indexed<Object<T, B>>>)
Source§type IntoIter = IntoIter<Id<T, B>, Multiset<Indexed<Object<T, B>>>>
type IntoIter = IntoIter<Id<T, B>, Multiset<Indexed<Object<T, B>>>>
Source§fn into_iter(self) -> <Properties<T, B> as IntoIterator>::IntoIter
fn into_iter(self) -> <Properties<T, B> as IntoIterator>::IntoIter
Source§impl<T, B> MappedEq for Properties<T, B>
impl<T, B> MappedEq for Properties<T, B>
Source§impl<T, B> PartialEq for Properties<T, B>
impl<T, B> PartialEq for Properties<T, B>
Source§impl<T, B> TryFromJson<T, B> for Properties<T, B>
impl<T, B> TryFromJson<T, B> for Properties<T, B>
fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, value: Value, ) -> Result<Properties<T, B>, InvalidExpandedJson>
Source§impl<T, B> TryFromJsonObject<T, B> for Properties<T, B>
impl<T, B> TryFromJsonObject<T, B> for Properties<T, B>
fn try_from_json_object_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, object: Object, ) -> Result<Properties<T, B>, InvalidExpandedJson>
impl<T, B> Eq for Properties<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for Properties<T, B>
impl<T, B> RefUnwindSafe for Properties<T, B>where
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B> Send for Properties<T, B>
impl<T, B> Sync for Properties<T, B>
impl<T, B> Unpin for Properties<T, B>
impl<T, B> UnwindSafe for Properties<T, B>where
B: UnwindSafe,
T: 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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.