Struct json_ld_core::object::node::reverse_properties::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>
source§impl<T: Eq + Hash, B: Eq + Hash> ReverseProperties<T, B>
impl<T: Eq + Hash, B: Eq + Hash> ReverseProperties<T, B>
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> ⓘwhere
T: 'a,
pub fn get<'a, Q: ?Sized + Hash + Equivalent<Id<T, B>>>(
&self,
prop: &Q,
) -> Nodes<'_, T, B> ⓘ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>>where
T: 'a,
pub fn get_any<'a, Q: ?Sized + Hash + Equivalent<Id<T, B>>>(
&self,
prop: &Q,
) -> Option<&IndexedNode<T, B>>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, prop: Id<T, B>, value: IndexedNode<T, B>)
pub fn insert(&mut self, prop: Id<T, B>, value: IndexedNode<T, B>)
Associate the given node to the given reverse property.
sourcepub fn insert_unique(&mut self, prop: Id<T, B>, value: IndexedNode<T, B>)
pub fn insert_unique(&mut self, prop: Id<T, B>, value: IndexedNode<T, B>)
Associate the given node to the given reverse property, unless it is already.
sourcepub fn insert_all<Objects: IntoIterator<Item = IndexedNode<T, B>>>(
&mut self,
prop: Id<T, B>,
values: Objects,
)
pub fn insert_all<Objects: IntoIterator<Item = IndexedNode<T, B>>>( &mut self, prop: Id<T, B>, values: Objects, )
Associate all the given nodes to the given reverse property.
sourcepub fn insert_all_unique<Nodes: IntoIterator<Item = IndexedNode<T, B>>>(
&mut self,
prop: Id<T, B>,
values: Nodes,
)
pub fn insert_all_unique<Nodes: IntoIterator<Item = IndexedNode<T, B>>>( &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: ReversePropertyNodes<T, B>)
pub fn extend_unique<N>(
&mut self,
iter: impl IntoIterator<Item = (Id<T, B>, N)>,
)where
N: IntoIterator<Item = IndexedNode<T, B>>,
sourcepub fn remove(&mut self, prop: &Id<T, B>) -> Option<ReversePropertyNodes<T, B>>
pub fn remove(&mut self, prop: &Id<T, B>) -> Option<ReversePropertyNodes<T, B>>
Removes and returns all the values associated to the given reverse property.
Trait Implementations§
source§impl<T: Clone, B: Clone> Clone for ReverseProperties<T, B>
impl<T: Clone, B: Clone> 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> Default for ReverseProperties<T, B>
impl<T, B> Default for ReverseProperties<T, B>
source§impl<T: Eq + Hash, B: Eq + Hash> Extend<(Id<T, B>, Vec<Indexed<Node<T, B>>>)> for ReverseProperties<T, B>
impl<T: Eq + Hash, B: Eq + Hash> 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: Eq + Hash, B: Eq + Hash, N> FromIterator<(Id<T, B>, N)> for ReverseProperties<T, B>where
N: IntoIterator<Item = IndexedNode<T, B>>,
impl<T: Eq + Hash, B: Eq + Hash, N> FromIterator<(Id<T, B>, N)> for ReverseProperties<T, B>where
N: IntoIterator<Item = IndexedNode<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§impl<T, B> IntoIterator for ReverseProperties<T, B>
impl<T, B> IntoIterator for ReverseProperties<T, B>
source§impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> IntoJsonWithContext<N> for ReverseProperties<T, B>
impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> IntoJsonWithContext<N> for ReverseProperties<T, B>
fn into_json_with(self, vocabulary: &N) -> Value
source§impl<T, B> PartialEq for ReverseProperties<T, B>
impl<T, B> PartialEq for ReverseProperties<T, B>
source§impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> PrecomputeSizeWithContext<N> for ReverseProperties<T, B>
impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> PrecomputeSizeWithContext<N> for ReverseProperties<T, B>
source§impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> PrintWithSizeAndContext<N> for ReverseProperties<T, B>
impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> PrintWithSizeAndContext<N> for ReverseProperties<T, B>
source§impl<T: Eq + Hash, B: Eq + Hash> TryFromJson<T, B> for ReverseProperties<T, B>
impl<T: Eq + Hash, B: Eq + Hash> TryFromJson<T, B> for ReverseProperties<T, B>
fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, value: Value, ) -> Result<Self, InvalidExpandedJson>
source§impl<T: Eq + Hash, B: Eq + Hash> TryFromJsonObject<T, B> for ReverseProperties<T, B>
impl<T: Eq + Hash, B: Eq + Hash> TryFromJsonObject<T, B> for ReverseProperties<T, B>
fn try_from_json_object_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, object: Object, ) -> Result<Self, 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
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
Compare self to
key
and return true
if they are equal.