pub struct Indexed<T> { /* private fields */ }
Expand description
Indexed objects.
Nodes and value objects may be indexed by a string in JSON-LD. This type is a wrapper around any kind of indexable data.
It is a pointer type that Deref
into the underlying value.
Implementations§
Source§impl<T> Indexed<T>
impl<T> Indexed<T>
pub fn inner_mut(&mut self) -> &mut T
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Drop the index and return the underlying value.
Sourcepub fn into_parts(self) -> (T, Option<String>)
pub fn into_parts(self) -> (T, Option<String>)
Turn this indexed value into its components: inner value and index.
Source§impl<T, B> Indexed<Node<T, B>>
impl<T, B> Indexed<Node<T, B>>
pub fn equivalent(&self, other: &Indexed<Node<T, B>>) -> bool
Source§impl<T, B> Indexed<Object<T, B>>
impl<T, B> Indexed<Object<T, B>>
pub fn equivalent(&self, other: &Indexed<Object<T, B>>) -> bool
Source§impl<T, B> Indexed<Object<T, B>>
impl<T, B> Indexed<Object<T, B>>
Sourcepub fn into_indexed_node(self) -> Option<Indexed<Node<T, B>>>
pub fn into_indexed_node(self) -> Option<Indexed<Node<T, B>>>
Converts this indexed object into an indexed node, if it is one.
Sourcepub fn into_indexed_value(self) -> Option<Indexed<Value<T>>>
pub fn into_indexed_value(self) -> Option<Indexed<Value<T>>>
Converts this indexed object into an indexed node, if it is one.
Sourcepub fn into_indexed_list(self) -> Option<Indexed<List<T, B>>>
pub fn into_indexed_list(self) -> Option<Indexed<List<T, B>>>
Converts this indexed object into an indexed list, if it is one.
Sourcepub fn into_unnamed_graph(
self,
) -> Result<IndexSet<Indexed<Object<T, B>>>, Indexed<Object<T, B>>>
pub fn into_unnamed_graph( self, ) -> Result<IndexSet<Indexed<Object<T, B>>>, Indexed<Object<T, B>>>
Try to convert this object into an unnamed graph.
pub fn entries(&self) -> IndexedEntries<'_, T, B> ⓘ
Trait Implementations§
Source§impl<I, B, T> CompactFragment<I, B> for Indexed<T>where
T: CompactIndexedFragment<I, B>,
impl<I, B, T> CompactFragment<I, B> for Indexed<T>where
T: CompactIndexedFragment<I, B>,
async fn compact_fragment_full<'a, N, L>( &'a self, vocabulary: &'a mut N, active_context: &'a Context<I, B>, type_scoped_context: &'a Context<I, B>, active_property: Option<&'a str>, loader: &'a L, options: Options, ) -> Result<Value, Error>
async fn compact_fragment_with<'a, N, L>( &'a self, vocabulary: &'a mut N, active_context: &'a Context<I, B>, loader: &'a mut L, ) -> Result<Value, Error>
async fn compact_fragment<'a, L>( &'a self, active_context: &'a Context<I, B>, loader: &'a mut L, ) -> Result<Value, Error>
Source§impl<T, B> Extend<Indexed<Object<T, B>>> for ExpandedDocument<T, B>
impl<T, B> Extend<Indexed<Object<T, B>>> for ExpandedDocument<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, B> FromIterator<Indexed<Object<T, B>>> for ExpandedDocument<T, B>
impl<T, B> FromIterator<Indexed<Object<T, B>>> for ExpandedDocument<T, B>
Source§fn from_iter<I>(iter: I) -> ExpandedDocument<T, B>
fn from_iter<I>(iter: I) -> ExpandedDocument<T, B>
Creates a value from an iterator. Read more
Source§impl<T, N> IntoJsonWithContext<N> for Indexed<T>where
T: IntoJsonWithContext<N>,
impl<T, N> IntoJsonWithContext<N> for Indexed<T>where
T: IntoJsonWithContext<N>,
fn into_json_with(self, vocabulary: &N) -> Value
Source§impl<T> MappedEq for Indexed<T>where
T: MappedEq,
impl<T> MappedEq for Indexed<T>where
T: MappedEq,
Source§impl<T> Ord for Indexed<T>where
T: Ord,
impl<T> Ord for Indexed<T>where
T: Ord,
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T> PartialOrd for Indexed<T>where
T: PartialOrd,
impl<T> PartialOrd for Indexed<T>where
T: PartialOrd,
Source§impl<T, B, N> PrecomputeSizeWithContext<N> for Indexed<Node<T, B>>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, N> PrecomputeSizeWithContext<N> for Indexed<Node<T, B>>where
N: Vocabulary<Iri = T, BlankId = B>,
Source§impl<T, B, N> PrecomputeSizeWithContext<N> for Indexed<Object<T, B>>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, N> PrecomputeSizeWithContext<N> for Indexed<Object<T, B>>where
N: Vocabulary<Iri = T, BlankId = B>,
Source§impl<T, B, N> PrintWithSizeAndContext<N> for Indexed<Node<T, B>>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, N> PrintWithSizeAndContext<N> for Indexed<Node<T, B>>where
N: Vocabulary<Iri = T, BlankId = B>,
Source§impl<T, B, N> PrintWithSizeAndContext<N> for Indexed<Object<T, B>>where
N: Vocabulary<Iri = T, BlankId = B>,
impl<T, B, N> PrintWithSizeAndContext<N> for Indexed<Object<T, B>>where
N: Vocabulary<Iri = T, BlankId = B>,
Source§impl<T, B, O> TryFromJson<T, B> for Indexed<O>where
O: TryFromJsonObject<T, B>,
impl<T, B, O> TryFromJson<T, B> for Indexed<O>where
O: TryFromJsonObject<T, B>,
fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, value: Value, ) -> Result<Indexed<O>, InvalidExpandedJson>
Source§impl<T, B, O> TryFromJsonObject<T, B> for Indexed<O>where
O: TryFromJsonObject<T, B>,
impl<T, B, O> TryFromJsonObject<T, B> for Indexed<O>where
O: TryFromJsonObject<T, B>,
fn try_from_json_object_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, object: Object, ) -> Result<Indexed<O>, InvalidExpandedJson>
impl<T> Eq for Indexed<T>where
T: Eq,
impl<T> StructuralPartialEq for Indexed<T>
Auto Trait Implementations§
impl<T> Freeze for Indexed<T>where
T: Freeze,
impl<T> RefUnwindSafe for Indexed<T>where
T: RefUnwindSafe,
impl<T> Send for Indexed<T>where
T: Send,
impl<T> Sync for Indexed<T>where
T: Sync,
impl<T> Unpin for Indexed<T>where
T: Unpin,
impl<T> UnwindSafe for Indexed<T>where
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.