Struct json_ld::object::node::Properties
source · pub struct Properties<T, B, M = ()>(_);
Expand description
Properties of a node object, and their associated objects.
Implementations§
source§impl<T, B, M> Properties<T, B, M>
impl<T, B, M> Properties<T, B, M>
source§impl<T, B, M> Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> Properties<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 property is associated to any object.
sourcepub fn get<Q>(&self, prop: &Q) -> Objects<'_, T, B, M> ⓘwhere
Q: Hash + Equivalent<Id<T, B>> + ?Sized,
pub fn get<Q>(&self, prop: &Q) -> Objects<'_, T, B, M> ⓘwhere Q: Hash + Equivalent<Id<T, B>> + ?Sized,
Returns an iterator over all the objects associated to the given property.
sourcepub fn get_any<Q>(
&self,
prop: &Q
) -> Option<&Meta<Indexed<Object<T, B, M>, M>, M>>where
Q: Hash + Equivalent<Id<T, B>> + ?Sized,
pub fn get_any<Q>( &self, prop: &Q ) -> Option<&Meta<Indexed<Object<T, B, M>, M>, M>>where Q: Hash + Equivalent<Id<T, B>> + ?Sized,
Get one of the objects associated to the given property.
If multiple objects are found, there are no guaranties on which object will be returned.
sourcepub fn insert(
&mut self,
_: Meta<Id<T, B>, M>,
value: Meta<Indexed<Object<T, B, M>, M>, M>
)
pub fn insert( &mut self, _: Meta<Id<T, B>, M>, value: Meta<Indexed<Object<T, B, M>, M>, M> )
Associate the given object to the node through the given property.
sourcepub fn insert_unique(
&mut self,
_: Meta<Id<T, B>, M>,
value: Meta<Indexed<Object<T, B, M>, M>, M>
)
pub fn insert_unique( &mut self, _: Meta<Id<T, B>, M>, value: Meta<Indexed<Object<T, B, M>, M>, M> )
Associate the given object to the node through the given 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<Object<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<Object<T, B, M>, M>, M>>,
Associate all the given objects to the node through the given property.
sourcepub fn insert_all_unique_stripped<Objects>(
&mut self,
_: Meta<Id<T, B>, M>,
values: Objects
)where
Objects: IntoIterator<Item = Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>,
pub fn insert_all_unique_stripped<Objects>( &mut self, _: Meta<Id<T, B>, M>, values: Objects )where Objects: IntoIterator<Item = Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>,
Associate all the given objects to the node through the given property, unless it is already.
The equivalence operator is used to remove equivalent objects.
sourcepub fn insert_all_unique<Objects>(
&mut self,
prop: Meta<Id<T, B>, M>,
values: Objects
)where
Objects: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
pub fn insert_all_unique<Objects>( &mut self, prop: Meta<Id<T, B>, M>, values: Objects )where Objects: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
Associate all the given objects to the node through the given property, unless it is already.
The equivalence operator is used to remove equivalent objects.
pub fn extend_unique<I, O>(&mut self, iter: I)where I: IntoIterator<Item = (Meta<Id<T, B>, M>, O)>, O: IntoIterator<Item = Meta<Indexed<Object<T, B, M>, M>, M>>,
pub fn extend_unique_stripped<I, O>(&mut self, iter: I)where I: IntoIterator<Item = (Meta<Id<T, B>, M>, O)>, O: IntoIterator<Item = Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>>,
Trait Implementations§
source§impl<T, B, M> Clone for Properties<T, B, M>where
T: Clone,
B: Clone,
M: Clone,
impl<T, B, M> Clone for Properties<T, B, M>where T: Clone, B: Clone, M: Clone,
source§fn clone(&self) -> Properties<T, B, M>
fn clone(&self) -> Properties<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, B, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Object<T, B, M>, M>, M>, Global>)> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Object<T, B, M>, M>, M>, Global>)> for Properties<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<Object<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<Object<T, B, M>, M>, M>, Global>)>,
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 Properties<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a Properties<T, B, M>
source§impl<'a, T, B, M> IntoIterator for &'a mut Properties<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a mut Properties<T, B, M>
§type Item = (Meta<&'a Id<T, B>, &'a mut M>, &'a mut Multiset<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, DeterministicHasherBuilder>)
type Item = (Meta<&'a Id<T, B>, &'a mut M>, &'a mut Multiset<Stripped<Meta<Indexed<Object<T, B, M>, M>, M>>, DeterministicHasherBuilder>)
source§fn into_iter(self) -> <&'a mut Properties<T, B, M> as IntoIterator>::IntoIter
fn into_iter(self) -> <&'a mut Properties<T, B, M> as IntoIterator>::IntoIter
source§impl<T, B, M> IntoIterator for Properties<T, B, M>
impl<T, B, M> IntoIterator for Properties<T, B, M>
source§impl<T, B, M> MappedEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> MappedEq<Properties<T, B, M>> for Properties<T, B, M>where T: Eq + Hash, B: Eq + Hash,
source§impl<T, B, M> PartialEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
M: PartialEq<M>,
impl<T, B, M> PartialEq<Properties<T, B, M>> for Properties<T, B, M>where T: Eq + Hash, B: Eq + Hash, M: PartialEq<M>,
source§fn eq(&self, other: &Properties<T, B, M>) -> bool
fn eq(&self, other: &Properties<T, B, M>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<T, B, M> StrippedHash for Properties<T, B, M>where
T: Hash,
B: Hash,
impl<T, B, M> StrippedHash for Properties<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<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> StrippedPartialEq<Properties<T, B, M>> for Properties<T, B, M>where T: Eq + Hash, B: Eq + Hash,
fn stripped_eq(&self, other: &Properties<T, B, M>) -> bool
source§impl<T, B, M> TryFromJson<T, B, M> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> TryFromJson<T, B, M> for Properties<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<Properties<T, B, M>, M>, Meta<InvalidExpandedJson<M>, M>>
source§impl<T, B, M> TryFromJsonObject<T, B, M> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
impl<T, B, M> TryFromJsonObject<T, B, M> for Properties<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<Properties<T, B, M>, M>, Meta<InvalidExpandedJson<M>, M>>
impl<T, B, M> Eq for Properties<T, B, M>where T: Eq + Hash, B: Eq + Hash, M: Eq,
impl<T, B, M> StrippedEq for Properties<T, B, M>where T: Eq + Hash, B: Eq + Hash,
Auto Trait Implementations§
impl<T, B, M> RefUnwindSafe for Properties<T, B, M>where B: RefUnwindSafe, M: RefUnwindSafe, T: RefUnwindSafe,
impl<T, B, M> Send for Properties<T, B, M>where B: Send, M: Send, T: Send,
impl<T, B, M> Sync for Properties<T, B, M>where B: Sync, M: Sync, T: Sync,
impl<T, B, M> Unpin for Properties<T, B, M>where B: Unpin, M: Unpin, T: Unpin,
impl<T, B, M> UnwindSafe for Properties<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
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
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
key
and return true
if they are equal.