Struct json_ld::object::node::reverse_properties::ReverseProperties
source · pub struct ReverseProperties<T, B, M>(_);
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, B, M> ReverseProperties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> ReverseProperties<T, B, M>where T: Eq + Hash, B: Eq + Hash,
sourcepub fn contains<Q>(&self, prop: &Q) -> boolwhere
Q: Hash + Equivalent<Id<T, B>> + ?Sized,
pub fn contains<Q>(&self, prop: &Q) -> boolwhere Q: Hash + Equivalent<Id<T, B>> + ?Sized,
Checks if the given reverse property is associated to any node.
sourcepub fn get<'a, Q>(&self, prop: &Q) -> Nodes<'_, T, B, M> ⓘwhere
Q: Hash + Equivalent<Id<T, B>> + ?Sized,
T: 'a,
pub fn get<'a, Q>(&self, prop: &Q) -> Nodes<'_, T, B, M> ⓘwhere Q: Hash + Equivalent<Id<T, B>> + ?Sized, T: 'a,
Returns an iterator over all the nodes associated to the given reverse property.
sourcepub fn get_any<'a, Q>(
&self,
prop: &Q
) -> Option<&Meta<Indexed<Node<T, B, M>, M>, M>>where
Q: Hash + Equivalent<Id<T, B>> + ?Sized,
T: 'a,
pub fn get_any<'a, Q>( &self, prop: &Q ) -> Option<&Meta<Indexed<Node<T, B, M>, M>, M>>where Q: Hash + Equivalent<Id<T, B>> + ?Sized, 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<Id<T, B>, M>,
value: Meta<Indexed<Node<T, B, M>, M>, M>
)
pub fn insert( &mut self, _: Meta<Id<T, B>, M>, value: Meta<Indexed<Node<T, B, M>, M>, M> )
Associate the given node to the given reverse property.
sourcepub fn insert_unique(
&mut self,
_: Meta<Id<T, B>, M>,
value: Meta<Indexed<Node<T, B, M>, M>, M>
)
pub fn insert_unique( &mut self, _: Meta<Id<T, B>, M>, value: Meta<Indexed<Node<T, B, M>, M>, M> )
Associate the given node to the given reverse 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<Node<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<Node<T, B, M>, M>, M>>,
Associate all the given nodes to the given reverse property.
sourcepub fn insert_all_unique_stripped<Nodes>(
&mut self,
_: Meta<Id<T, B>, M>,
values: Nodes
)where
Nodes: IntoIterator<Item = Stripped<Meta<Indexed<Node<T, B, M>, M>, M>>>,
pub fn insert_all_unique_stripped<Nodes>( &mut self, _: Meta<Id<T, B>, M>, values: Nodes )where Nodes: IntoIterator<Item = Stripped<Meta<Indexed<Node<T, B, M>, M>, M>>>,
Associate all the given nodes to the given reverse property, unless it is already.
sourcepub fn insert_all_unique<Nodes>(
&mut self,
prop: Meta<Id<T, B>, M>,
values: Nodes
)where
Nodes: IntoIterator<Item = Meta<Indexed<Node<T, B, M>, M>, M>>,
pub fn insert_all_unique<Nodes>( &mut self, prop: Meta<Id<T, B>, M>, values: Nodes )where Nodes: IntoIterator<Item = Meta<Indexed<Node<T, B, M>, M>, M>>,
Associate all the given nodes to the given reverse property, unless it is already.
pub fn extend_unique<I, N>(&mut self, iter: I)where I: IntoIterator<Item = (Meta<Id<T, B>, M>, N)>, N: IntoIterator<Item = Meta<Indexed<Node<T, B, M>, M>, M>>,
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<Meta<Indexed<Node<T, B, M>, M>, M>>>,
Trait Implementations§
source§impl<T, B, M> Clone for ReverseProperties<T, B, M>where
T: Clone,
B: Clone,
M: Clone,
impl<T, B, M> Clone for ReverseProperties<T, B, M>where T: Clone, B: Clone, M: Clone,
source§fn clone(&self) -> ReverseProperties<T, B, M>
fn clone(&self) -> ReverseProperties<T, B, M>
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, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Node<T, B, M>, M>, M>, Global>)> for ReverseProperties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Node<T, B, M>, M>, M>, Global>)> for ReverseProperties<T, B, M>where T: Eq + Hash, B: Eq + Hash,
source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (Meta<Id<T, B>, M>, Vec<Meta<Indexed<Node<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<Node<T, B, M>, M>, M>, Global>)>,
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<'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>
§type Item = (Meta<&'a Id<T, B>, &'a mut M>, &'a mut Multiset<Stripped<Meta<Indexed<Node<T, B, M>, M>, M>>, DeterministicHasherBuilder>)
type Item = (Meta<&'a Id<T, B>, &'a mut M>, &'a mut Multiset<Stripped<Meta<Indexed<Node<T, B, M>, M>, M>>, DeterministicHasherBuilder>)
The type of the elements being iterated over.
source§fn into_iter(
self
) -> <&'a mut ReverseProperties<T, B, M> as IntoIterator>::IntoIter
fn into_iter( self ) -> <&'a mut ReverseProperties<T, B, M> as IntoIterator>::IntoIter
Creates an iterator from a value. Read more
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, N> IntoJsonWithContextMeta<M, N> for ReverseProperties<T, B, M>where
M: Clone,
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, M, N> IntoJsonWithContextMeta<M, N> for ReverseProperties<T, B, M>where M: Clone, N: Vocabulary<Iri = T, BlankId = B>,
source§impl<T, B, M> MappedEq<ReverseProperties<T, B, M>> for ReverseProperties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> MappedEq<ReverseProperties<T, B, M>> for ReverseProperties<T, B, M>where T: Eq + Hash, B: Eq + Hash,
source§impl<T, B, M> PartialEq<ReverseProperties<T, B, M>> for ReverseProperties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
M: PartialEq<M>,
impl<T, B, M> PartialEq<ReverseProperties<T, B, M>> for ReverseProperties<T, B, M>where T: Eq + Hash, B: Eq + Hash, M: PartialEq<M>,
source§fn eq(&self, other: &ReverseProperties<T, B, M>) -> bool
fn eq(&self, other: &ReverseProperties<T, B, M>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T, B, M, N> PrecomputeSizeWithContext<N> for ReverseProperties<T, B, M>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, M, N> PrecomputeSizeWithContext<N> for ReverseProperties<T, B, M>where N: Vocabulary<Iri = T, BlankId = B>,
source§impl<T, B, M, N> PrintWithSizeAndContext<N> for ReverseProperties<T, B, M>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, M, N> PrintWithSizeAndContext<N> for ReverseProperties<T, B, M>where N: Vocabulary<Iri = T, BlankId = B>,
source§impl<T, B, M> StrippedHash for ReverseProperties<T, B, M>where
T: Hash,
B: Hash,
impl<T, B, M> StrippedHash for ReverseProperties<T, B, M>where T: Hash, B: Hash,
fn stripped_hash<H>(&self, h: &mut H)where H: Hasher,
source§impl<T, B, M> StrippedPartialEq<ReverseProperties<T, B, M>> for ReverseProperties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> StrippedPartialEq<ReverseProperties<T, B, M>> for ReverseProperties<T, B, M>where T: Eq + Hash, B: Eq + Hash,
fn stripped_eq(&self, other: &ReverseProperties<T, B, M>) -> bool
source§impl<T, B, M> TryFromJson<T, B, M> for ReverseProperties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> TryFromJson<T, B, M> for ReverseProperties<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<ReverseProperties<T, B, M>, M>, Meta<InvalidExpandedJson<M>, M>>
source§impl<T, B, M> TryFromJsonObject<T, B, M> for ReverseProperties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> TryFromJsonObject<T, B, M> for ReverseProperties<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<ReverseProperties<T, B, M>, M>, Meta<InvalidExpandedJson<M>, M>>
impl<T, B, M> Eq for ReverseProperties<T, B, M>where T: Eq + Hash, B: Eq + Hash, M: Eq,
impl<T, B, M> StrippedEq for ReverseProperties<T, B, M>where T: Eq + Hash, B: Eq + Hash,
Auto Trait Implementations§
impl<T, B, M> RefUnwindSafe for ReverseProperties<T, B, M>where B: RefUnwindSafe, M: RefUnwindSafe, T: RefUnwindSafe,
impl<T, B, M> Send for ReverseProperties<T, B, M>where B: Send, M: Send, T: Send,
impl<T, B, M> Sync for ReverseProperties<T, B, M>where B: Sync, M: Sync, T: Sync,
impl<T, B, M> Unpin for ReverseProperties<T, B, M>where B: Unpin, M: Unpin, T: Unpin,
impl<T, B, M> UnwindSafe for ReverseProperties<T, B, M>where B: UnwindSafe, M: 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<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
§impl<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
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<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,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.