Struct json_ld::object::node::ReverseProperties
source · 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 copy 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§fn into_iter(self) -> <&'a ReverseProperties<T, B> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a ReverseProperties<T, B> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
source§impl<'a, T, B> IntoIterator for &'a mut ReverseProperties<T, B>
impl<'a, T, B> IntoIterator for &'a mut ReverseProperties<T, B>
§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.
§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§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§fn eq(&self, other: &ReverseProperties<T, B>) -> bool
fn eq(&self, other: &ReverseProperties<T, B>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.