Struct json_ld_core::object::node::properties::Properties
source · [−]pub struct Properties<T, B, M = ()>(_);
Expand description
Properties of a node object, and their associated objects.
Implementations
sourceimpl<T, B, M> Properties<T, B, M>
impl<T, B, M> Properties<T, B, M>
sourcepub fn iter(&self) -> Iter<'_, T, B, M>ⓘNotable traits for Iter<'a, T, B, M>impl<'a, T, B, M> Iterator for Iter<'a, T, B, M> type Item = BindingRef<'a, T, B, M>;
pub fn iter(&self) -> Iter<'_, T, B, M>ⓘNotable traits for Iter<'a, T, B, M>impl<'a, T, B, M> Iterator for Iter<'a, T, B, M> type Item = BindingRef<'a, T, B, M>;
Returns an iterator over the properties and their associated objects.
sourceimpl<T: Eq + Hash, B: Eq + Hash, M> Properties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> Properties<T, B, M>
sourcepub fn contains<Q: IntoId<T, B>>(&self, prop: Q) -> bool
pub fn contains<Q: IntoId<T, B>>(&self, prop: Q) -> bool
Checks if the given property is associated to any object.
sourcepub fn get<Q: IntoId<T, B>>(&self, prop: Q) -> Objects<'_, T, B, M>ⓘNotable traits for Objects<'a, T, B, M>impl<'a, T, B, M> Iterator for Objects<'a, T, B, M> type Item = &'a IndexedObject<T, B, M>;
pub fn get<Q: IntoId<T, B>>(&self, prop: Q) -> Objects<'_, T, B, M>ⓘNotable traits for Objects<'a, T, B, M>impl<'a, T, B, M> Iterator for Objects<'a, T, B, M> type Item = &'a IndexedObject<T, B, M>;
Returns an iterator over all the objects associated to the given property.
sourcepub fn get_any<Q: IntoId<T, B>>(
&self,
prop: Q
) -> Option<&IndexedObject<T, B, M>>
pub fn get_any<Q: IntoId<T, B>>(
&self,
prop: Q
) -> Option<&IndexedObject<T, B, M>>
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: Meta<Id<T, B>, M>, value: IndexedObject<T, B, M>)
pub fn insert(&mut self, Meta: Meta<Id<T, B>, M>, value: IndexedObject<T, B, M>)
Associate the given object to the node through the given property.
sourcepub fn insert_unique(
&mut self,
Meta: Meta<Id<T, B>, M>,
value: IndexedObject<T, B, M>
)
pub fn insert_unique(
&mut self,
Meta: Meta<Id<T, B>, M>,
value: IndexedObject<T, B, M>
)
Associate the given object to the node through the given property, unless it is already.
sourcepub fn insert_all<Objects: IntoIterator<Item = IndexedObject<T, B, M>>>(
&mut self,
Meta: Meta<Id<T, B>, M>,
values: Objects
)
pub fn insert_all<Objects: IntoIterator<Item = IndexedObject<T, B, M>>>(
&mut self,
Meta: Meta<Id<T, B>, M>,
values: Objects
)
Associate all the given objects to the node through the given property.
sourcepub fn insert_all_unique_stripped<Objects: IntoIterator<Item = StrippedIndexedObject<T, B, M>>>(
&mut self,
Meta: Meta<Id<T, B>, M>,
values: Objects
)
pub fn insert_all_unique_stripped<Objects: IntoIterator<Item = StrippedIndexedObject<T, B, M>>>(
&mut self,
Meta: Meta<Id<T, B>, M>,
values: Objects
)
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: IntoIterator<Item = IndexedObject<T, B, M>>>(
&mut self,
prop: Meta<Id<T, B>, M>,
values: Objects
)
pub fn insert_all_unique<Objects: IntoIterator<Item = IndexedObject<T, B, M>>>(
&mut self,
prop: Meta<Id<T, B>, M>,
values: Objects
)
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 = IndexedObject<T, B, 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 = StrippedIndexedObject<T, B, M>>,
sourcepub fn remove(&mut self, prop: &Id<T, B>) -> Option<PropertyEntry<T, B, M>>
pub fn remove(&mut self, prop: &Id<T, B>) -> Option<PropertyEntry<T, B, M>>
Removes and returns all the values associated to the given property.
Trait Implementations
sourceimpl<T: Clone, B: Clone, M: Clone> Clone for Properties<T, B, M>
impl<T: Clone, B: Clone, M: Clone> Clone for Properties<T, B, M>
sourcefn clone(&self) -> Properties<T, B, M>
fn clone(&self) -> Properties<T, B, M>
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<T: Eq + Hash, B: Eq + Hash, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Object<T, B, M>, M>, M>, Global>)> for Properties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> Extend<(Meta<Id<T, B>, M>, Vec<Meta<Indexed<Object<T, B, M>, M>, M>, Global>)> for Properties<T, B, M>
sourcefn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (Meta<Id<T, B>, M>, Vec<IndexedObject<T, B, M>>)>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = (Meta<Id<T, B>, M>, Vec<IndexedObject<T, B, M>>)>,
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)sourceimpl<'a, T, B, M> IntoIterator for &'a Properties<T, B, M>
impl<'a, T, B, M> IntoIterator for &'a Properties<T, B, M>
sourceimpl<'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>
sourceimpl<T, B, M> IntoIterator for Properties<T, B, M>
impl<T, B, M> IntoIterator for Properties<T, B, M>
sourceimpl<T: Eq + Hash, B: Eq + Hash, M> MappedEq<Properties<T, B, M>> for Properties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> MappedEq<Properties<T, B, M>> for Properties<T, B, M>
sourceimpl<T, B, M> PartialEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
M: PartialEq,
impl<T, B, M> PartialEq<Properties<T, B, M>> for Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
M: PartialEq,
sourceimpl<T: Hash, B: Hash, M> StrippedHash for Properties<T, B, M>
impl<T: Hash, B: Hash, M> StrippedHash for Properties<T, B, M>
fn stripped_hash<H: Hasher>(&self, h: &mut H)
sourceimpl<T: Eq + Hash, B: Eq + Hash, M> StrippedPartialEq<Properties<T, B, M>> for Properties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> StrippedPartialEq<Properties<T, B, M>> for Properties<T, B, M>
fn stripped_eq(&self, other: &Self) -> bool
sourceimpl<T: Eq + Hash, B: Eq + Hash, M> TryFromJson<T, B, M> for Properties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> TryFromJson<T, B, M> for Properties<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>>
sourceimpl<T: Eq + Hash, B: Eq + Hash, M> TryFromJsonObject<T, B, M> for Properties<T, B, M>
impl<T: Eq + Hash, B: Eq + Hash, M> TryFromJsonObject<T, B, M> for Properties<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 Properties<T, B, M>where
T: Eq + Hash,
B: Eq + Hash,
M: Eq,
impl<T: Eq + Hash, B: Eq + Hash, M> StrippedEq for Properties<T, B, M>
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> BorrowStripped for T
impl<T> BorrowStripped for T
sourceimpl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
sourceimpl<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
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.