Struct json_ld_core::object::node::reverse_properties::ReverseProperties
source · pub struct ReverseProperties<T, B, M>(/* private fields */);
Expand description
Reverse properties of a node object, and their associated nodes.
Implementations§
source§impl<T, B, M> ReverseProperties<T, B, M>
impl<T, B, M> ReverseProperties<T, B, M>
source§impl<T: Eq + Hash, B: Eq + Hash, M> ReverseProperties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> ReverseProperties<T, B, M>
sourcepub fn contains<Q: ?Sized + Hash + Equivalent<Id<T, B>>>(
&self,
prop: &Q
) -> bool
pub fn contains<Q: ?Sized + Hash + Equivalent<Id<T, B>>>( &self, prop: &Q ) -> bool
Checks if the given reverse property is associated to any node.
sourcepub fn get<'a, Q: ?Sized + Hash + Equivalent<Id<T, B>>>(
&self,
prop: &Q
) -> Nodes<'_, T, B, M> ⓘwhere
T: 'a,
pub fn get<'a, Q: ?Sized + Hash + Equivalent<Id<T, B>>>(
&self,
prop: &Q
) -> Nodes<'_, T, B, M> ⓘwhere
T: 'a,
Returns an iterator over all the nodes associated to the given reverse property.
sourcepub fn get_any<'a, Q: ?Sized + Hash + Equivalent<Id<T, B>>>(
&self,
prop: &Q
) -> Option<&IndexedNode<T, B, M>>where
T: 'a,
pub fn get_any<'a, Q: ?Sized + Hash + Equivalent<Id<T, B>>>(
&self,
prop: &Q
) -> Option<&IndexedNode<T, B, M>>where
T: 'a,
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, Meta: Meta<Id<T, B>, M>, value: IndexedNode<T, B, M>)
pub fn insert(&mut self, Meta: Meta<Id<T, B>, M>, value: IndexedNode<T, B, M>)
Associate the given node to the given reverse property.
sourcepub fn insert_unique(
&mut self,
Meta: Meta<Id<T, B>, M>,
value: IndexedNode<T, B, M>
)
pub fn insert_unique( &mut self, Meta: Meta<Id<T, B>, M>, value: IndexedNode<T, B, M> )
Associate the given node to the given reverse property, unless it is already.
sourcepub fn insert_all<Objects: IntoIterator<Item = IndexedNode<T, B, M>>>(
&mut self,
Meta: Meta<Id<T, B>, M>,
values: Objects
)
pub fn insert_all<Objects: IntoIterator<Item = IndexedNode<T, B, M>>>( &mut self, Meta: Meta<Id<T, B>, M>, values: Objects )
Associate all the given nodes to the given reverse property.
sourcepub fn insert_all_unique_stripped<Nodes: IntoIterator<Item = Stripped<IndexedNode<T, B, M>>>>(
&mut self,
Meta: Meta<Id<T, B>, M>,
values: Nodes
)
pub fn insert_all_unique_stripped<Nodes: IntoIterator<Item = Stripped<IndexedNode<T, B, M>>>>( &mut self, Meta: Meta<Id<T, B>, M>, values: Nodes )
Associate all the given nodes to the given reverse property, unless it is already.
sourcepub fn insert_all_unique<Nodes: IntoIterator<Item = IndexedNode<T, B, M>>>(
&mut self,
prop: Meta<Id<T, B>, M>,
values: Nodes
)
pub fn insert_all_unique<Nodes: IntoIterator<Item = IndexedNode<T, B, M>>>( &mut self, prop: Meta<Id<T, B>, M>, values: Nodes )
Associate all the given nodes to the given reverse property, unless it is already.
pub fn extend_unique<I, N>(&mut self, iter: I)
pub fn extend_unique_stripped<I, N>(&mut self, iter: I)where
I: IntoIterator<Item = (Meta<Id<T, B>, M>, N)>,
N: IntoIterator<Item = Stripped<IndexedNode<T, B, M>>>,
sourcepub fn remove(
&mut self,
prop: &Id<T, B>
) -> Option<ReversePropertyEntry<T, B, M>>
pub fn remove( &mut self, prop: &Id<T, B> ) -> Option<ReversePropertyEntry<T, B, M>>
Removes and returns all the values associated to the given reverse property.
Trait Implementations§
source§impl<T: Clone, B: Clone, M: Clone> Clone for ReverseProperties<T, B, M>
impl<T: Clone, B: Clone, M: Clone> Clone for ReverseProperties<T, B, M>
source§fn clone(&self) -> ReverseProperties<T, B, M>
fn clone(&self) -> ReverseProperties<T, B, M>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<T: Eq + Hash, B: Eq + Hash, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Node<T, B, M>, M>, M>>)> for ReverseProperties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Node<T, B, M>, M>, M>>)> for ReverseProperties<T, B, M>
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<'a, T, B, M> IntoIterator for &'a ReverseProperties<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a ReverseProperties<T, B, M>
source§impl<'a, T, B, M> IntoIterator for &'a mut ReverseProperties<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a mut ReverseProperties<T, B, M>
source§impl<T, B, M> IntoIterator for ReverseProperties<T, B, M>
impl<T, B, M> IntoIterator for ReverseProperties<T, B, M>
source§impl<T, B, M: Clone, N: Vocabulary<Iri = T, BlankId = B>> IntoJsonWithContextMeta<M, N> for ReverseProperties<T, B, M>
impl<T, B, M: Clone, N: Vocabulary<Iri = T, BlankId = B>> IntoJsonWithContextMeta<M, N> for ReverseProperties<T, B, M>
source§impl<T, B, M> PartialEq for ReverseProperties<T, B, M>
impl<T, B, M> PartialEq for ReverseProperties<T, B, M>
source§impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrecomputeSizeWithContext<N> for ReverseProperties<T, B, M>
impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrecomputeSizeWithContext<N> for ReverseProperties<T, B, M>
source§impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrintWithSizeAndContext<N> for ReverseProperties<T, B, M>
impl<T, B, M, N: Vocabulary<Iri = T, BlankId = B>> PrintWithSizeAndContext<N> for ReverseProperties<T, B, M>
source§impl<T: Hash, B: Hash, M> StrippedHash for ReverseProperties<T, B, M>
impl<T: Hash, B: Hash, M> StrippedHash for ReverseProperties<T, B, M>
fn stripped_hash<H: Hasher>(&self, h: &mut H)
source§impl<T: Eq + Hash, B: Eq + Hash, M> StrippedPartialEq for ReverseProperties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> StrippedPartialEq for ReverseProperties<T, B, M>
fn stripped_eq(&self, other: &Self) -> bool
source§impl<T: Eq + Hash, B: Eq + Hash, M> TryFromJson<T, B, M> for ReverseProperties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> TryFromJson<T, B, M> for ReverseProperties<T, B, M>
fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, Meta: Meta<Value<M>, M> ) -> Result<Meta<Self, M>, Meta<InvalidExpandedJson<M>, M>>
source§impl<T: Eq + Hash, B: Eq + Hash, M> TryFromJsonObject<T, B, M> for ReverseProperties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> TryFromJsonObject<T, B, M> for ReverseProperties<T, B, M>
fn try_from_json_object_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, Meta: Meta<Object<M>, M> ) -> Result<Meta<Self, M>, Meta<InvalidExpandedJson<M>, M>>
impl<T, B, M> Eq for ReverseProperties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> StrippedEq for ReverseProperties<T, B, M>
Auto Trait Implementations§
impl<T, B, M> RefUnwindSafe for ReverseProperties<T, B, M>
impl<T, B, M> Send for ReverseProperties<T, B, M>
impl<T, B, M> Sync for ReverseProperties<T, B, M>
impl<T, B, M> Unpin for ReverseProperties<T, B, M>
impl<T, B, M> UnwindSafe for ReverseProperties<T, B, M>
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
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.