pub struct ReverseProperties<T = IriBuf, B = BlankIdBuf>(/* private fields */);
Expand description
Reverse properties of a node object, and their associated nodes.
Implementations§
Source§impl<T, B> ReverseProperties<T, B>
impl<T, B> ReverseProperties<T, B>
Sourcepub fn new() -> ReverseProperties<T, B>
pub fn new() -> ReverseProperties<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 reverse properties and their associated nodes.
Source§impl<T, B> ReverseProperties<T, B>
impl<T, B> ReverseProperties<T, B>
Sourcepub fn contains<Q>(&self, prop: &Q) -> bool
pub fn contains<Q>(&self, prop: &Q) -> bool
Checks if the given reverse property is associated to any node.
Sourcepub fn get<'a, Q>(&self, prop: &Q) -> Nodes<'_, T, B> ⓘ
pub fn get<'a, Q>(&self, prop: &Q) -> Nodes<'_, T, B> ⓘ
Returns an iterator over all the nodes associated to the given reverse property.
Sourcepub fn get_any<'a, Q>(&self, prop: &Q) -> Option<&Indexed<Node<T, B>>>
pub fn get_any<'a, Q>(&self, prop: &Q) -> Option<&Indexed<Node<T, B>>>
Get one of the nodes associated to the given reverse property.
If multiple nodes are found, there are no guaranties on which node will be returned.
Sourcepub fn insert(&mut self, prop: Id<T, B>, value: Indexed<Node<T, B>>)
pub fn insert(&mut self, prop: Id<T, B>, value: Indexed<Node<T, B>>)
Associate the given node to the given reverse property.
Sourcepub fn insert_unique(&mut self, prop: Id<T, B>, value: Indexed<Node<T, B>>)
pub fn insert_unique(&mut self, prop: Id<T, B>, value: Indexed<Node<T, B>>)
Associate the given node to the given reverse 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 nodes to the given reverse property.
Sourcepub fn insert_all_unique<Nodes>(&mut self, prop: Id<T, B>, values: Nodes)
pub fn insert_all_unique<Nodes>(&mut self, prop: Id<T, B>, values: Nodes)
Associate all the given nodes to the given reverse property, unless it is already.
pub fn set(&mut self, prop: Id<T, B>, values: Multiset<Indexed<Node<T, B>>>)
pub fn extend_unique<N>( &mut self, iter: impl IntoIterator<Item = (Id<T, B>, N)>, )
Trait Implementations§
Source§impl<T, B> Clone for ReverseProperties<T, B>
impl<T, B> Clone for ReverseProperties<T, B>
Source§fn clone(&self) -> ReverseProperties<T, B>
fn clone(&self) -> ReverseProperties<T, B>
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<T, B> Debug for ReverseProperties<T, B>
impl<T, B> Debug for ReverseProperties<T, B>
Source§impl<T, B> Default for ReverseProperties<T, B>
impl<T, B> Default for ReverseProperties<T, B>
Source§fn default() -> ReverseProperties<T, B>
fn default() -> ReverseProperties<T, B>
Returns the “default value” for a type. Read more
Source§impl<T, B> Extend<(Id<T, B>, Vec<Indexed<Node<T, B>>>)> for ReverseProperties<T, B>
impl<T, B> Extend<(Id<T, B>, Vec<Indexed<Node<T, B>>>)> for ReverseProperties<T, B>
Source§fn extend<I>(&mut self, iter: I)
fn extend<I>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<T, B, N> FromIterator<(Id<T, B>, N)> for ReverseProperties<T, B>
impl<T, B, N> FromIterator<(Id<T, B>, N)> for ReverseProperties<T, B>
Source§fn from_iter<I>(iter: I) -> ReverseProperties<T, B>where
I: IntoIterator<Item = (Id<T, B>, N)>,
fn from_iter<I>(iter: I) -> ReverseProperties<T, B>where
I: IntoIterator<Item = (Id<T, B>, N)>,
Creates a value from an iterator. Read more
Source§impl<T, B> Hash for ReverseProperties<T, B>
impl<T, B> Hash for ReverseProperties<T, B>
Source§impl<'a, T, B> IntoIterator for &'a ReverseProperties<T, B>
impl<'a, T, B> IntoIterator for &'a ReverseProperties<T, B>
Source§impl<'a, T, B> IntoIterator for &'a mut ReverseProperties<T, B>
impl<'a, T, B> IntoIterator for &'a mut ReverseProperties<T, B>
Source§type Item = (&'a Id<T, B>, &'a mut Multiset<Indexed<Node<T, B>>>)
type Item = (&'a Id<T, B>, &'a mut Multiset<Indexed<Node<T, B>>>)
The type of the elements being iterated over.
Source§type IntoIter = IterMut<'a, Id<T, B>, Multiset<Indexed<Node<T, B>>>>
type IntoIter = IterMut<'a, Id<T, B>, Multiset<Indexed<Node<T, B>>>>
Which kind of iterator are we turning this into?
Source§fn into_iter(
self,
) -> <&'a mut ReverseProperties<T, B> as IntoIterator>::IntoIter
fn into_iter( self, ) -> <&'a mut ReverseProperties<T, B> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl<T, B> IntoIterator for ReverseProperties<T, B>
impl<T, B> IntoIterator for ReverseProperties<T, B>
Source§type Item = (Id<T, B>, Multiset<Indexed<Node<T, B>>>)
type Item = (Id<T, B>, Multiset<Indexed<Node<T, B>>>)
The type of the elements being iterated over.
Source§type IntoIter = IntoIter<Id<T, B>, Multiset<Indexed<Node<T, B>>>>
type IntoIter = IntoIter<Id<T, B>, Multiset<Indexed<Node<T, B>>>>
Which kind of iterator are we turning this into?
Source§fn into_iter(self) -> <ReverseProperties<T, B> as IntoIterator>::IntoIter
fn into_iter(self) -> <ReverseProperties<T, B> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
Source§impl<T, B, N> IntoJsonWithContext<N> for ReverseProperties<T, B>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, N> IntoJsonWithContext<N> for ReverseProperties<T, B>where
N: Vocabulary<Iri = T, BlankId = B>,
fn into_json_with(self, vocabulary: &N) -> Value
Source§impl<T, B> MappedEq for ReverseProperties<T, B>
impl<T, B> MappedEq for ReverseProperties<T, B>
Source§impl<T, B> PartialEq for ReverseProperties<T, B>
impl<T, B> PartialEq for ReverseProperties<T, B>
Source§impl<T, B, N> PrecomputeSizeWithContext<N> for ReverseProperties<T, B>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, N> PrecomputeSizeWithContext<N> for ReverseProperties<T, B>where
N: Vocabulary<Iri = T, BlankId = B>,
Source§impl<T, B, N> PrintWithSizeAndContext<N> for ReverseProperties<T, B>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, N> PrintWithSizeAndContext<N> for ReverseProperties<T, B>where
N: Vocabulary<Iri = T, BlankId = B>,
Source§impl<T, B> TryFromJson<T, B> for ReverseProperties<T, B>
impl<T, B> TryFromJson<T, B> for ReverseProperties<T, B>
fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, value: Value, ) -> Result<ReverseProperties<T, B>, InvalidExpandedJson>
Source§impl<T, B> TryFromJsonObject<T, B> for ReverseProperties<T, B>
impl<T, B> TryFromJsonObject<T, B> for ReverseProperties<T, B>
fn try_from_json_object_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, object: Object, ) -> Result<ReverseProperties<T, B>, InvalidExpandedJson>
impl<T, B> Eq for ReverseProperties<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for ReverseProperties<T, B>
impl<T, B> RefUnwindSafe for ReverseProperties<T, B>where
B: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, B> Send for ReverseProperties<T, B>
impl<T, B> Sync for ReverseProperties<T, B>
impl<T, B> Unpin for ReverseProperties<T, B>
impl<T, B> UnwindSafe for ReverseProperties<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
Mutably borrows from an owned value. Read more
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
Compare self to
key
and return true
if they are equal.