pub struct List<T, B> { /* private fields */ }Expand description
List object.
Implementations§
Source§impl<T, B> List<T, B>
impl<T, B> List<T, B>
Sourcepub fn new(objects: Vec<IndexedObject<T, B>>) -> Self
pub fn new(objects: Vec<IndexedObject<T, B>>) -> Self
Creates a new list object.
Sourcepub fn entry(&self) -> &[IndexedObject<T, B>] ⓘ
pub fn entry(&self) -> &[IndexedObject<T, B>] ⓘ
Returns the objects of the @list entry, in list order.
Alias for as_slice.
Sourcepub fn entry_mut(&mut self) -> &mut Vec<IndexedObject<T, B>> ⓘ
pub fn entry_mut(&mut self) -> &mut Vec<IndexedObject<T, B>> ⓘ
Mutably borrows the objects of the @list entry.
Sourcepub fn as_slice(&self) -> &[IndexedObject<T, B>] ⓘ
pub fn as_slice(&self) -> &[IndexedObject<T, B>] ⓘ
Returns the objects of the list as a slice, in list order.
Sourcepub fn as_mut_slice(&mut self) -> &mut [IndexedObject<T, B>] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [IndexedObject<T, B>] ⓘ
Returns the objects of the list as a mutable slice, in list order.
Sourcepub fn into_entry(self) -> Vec<IndexedObject<T, B>> ⓘ
pub fn into_entry(self) -> Vec<IndexedObject<T, B>> ⓘ
Consumes the list, returning the objects of its @list entry.
Sourcepub fn push(&mut self, object: IndexedObject<T, B>)
pub fn push(&mut self, object: IndexedObject<T, B>)
Appends an object to the end of the list.
Sourcepub fn pop(&mut self) -> Option<IndexedObject<T, B>>
pub fn pop(&mut self) -> Option<IndexedObject<T, B>>
Removes the last object of the list and returns it.
Sourcepub fn iter(&self) -> Iter<'_, IndexedObject<T, B>> ⓘ
pub fn iter(&self) -> Iter<'_, IndexedObject<T, B>> ⓘ
Returns an iterator over the objects of the list, in list order.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, IndexedObject<T, B>> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, IndexedObject<T, B>> ⓘ
Returns a mutable iterator over the objects of the list, in list order.
Sourcepub fn canonicalize_with(&mut self, buffer: &mut Buffer)
pub fn canonicalize_with(&mut self, buffer: &mut Buffer)
Puts every literal of the list into canonical form, using the given
buffer to render numbers.
Sourcepub fn canonicalize(&mut self)
pub fn canonicalize(&mut self)
Puts every literal of the list into canonical form.
Trait Implementations§
Source§impl<T, B> Any<T, B> for List<T, B>
impl<T, B> Any<T, B> for List<T, B>
Source§fn id(&self) -> Option<&Id<T, B>>
fn id(&self) -> Option<&Id<T, B>>
Returns the identifier (
@id) of the object, if it is a node object
with one.Source§fn language<'a>(&'a self) -> Option<&'a LenientLangTag>where
T: 'a,
B: 'a,
fn language<'a>(&'a self) -> Option<&'a LenientLangTag>where
T: 'a,
B: 'a,
Returns the language tag of this value, if it carries one.
impl<T: Eq + Hash, B: Eq + Hash> Eq for List<T, B>
Source§impl<'a, T, B> IntoIterator for &'a List<T, B>
impl<'a, T, B> IntoIterator for &'a List<T, B>
Source§impl<'a, T, B> IntoIterator for &'a mut List<T, B>
impl<'a, T, B> IntoIterator for &'a mut List<T, B>
Source§impl<T, B> IntoIterator for List<T, B>
impl<T, B> IntoIterator for List<T, B>
Source§impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> IntoJsonWithContext<N> for List<T, B>
impl<T, B, N: Vocabulary<Iri = T, BlankId = B>> IntoJsonWithContext<N> for List<T, B>
Source§impl<T, B, I: Interpretation> LinkedData<I> for List<T, B>where
T: LinkedDataResource<I> + LinkedDataSubject<I>,
B: LinkedDataResource<I> + LinkedDataSubject<I>,
impl<T, B, I: Interpretation> LinkedData<I> for List<T, B>where
T: LinkedDataResource<I> + LinkedDataSubject<I>,
B: LinkedDataResource<I> + LinkedDataSubject<I>,
Source§impl<T, B, I: Interpretation> LinkedDataGraph<I> for List<T, B>where
T: LinkedDataResource<I> + LinkedDataSubject<I>,
B: LinkedDataResource<I> + LinkedDataSubject<I>,
impl<T, B, I: Interpretation> LinkedDataGraph<I> for List<T, B>where
T: LinkedDataResource<I> + LinkedDataSubject<I>,
B: LinkedDataResource<I> + LinkedDataSubject<I>,
Source§fn visit_graph<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: GraphVisitor<I>,
fn visit_graph<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: GraphVisitor<I>,
Visits the subjects of the graph represented by this value.
Source§impl<T, B, I: Interpretation> LinkedDataPredicateObjects<I> for List<T, B>where
T: LinkedDataResource<I> + LinkedDataSubject<I>,
B: LinkedDataResource<I> + LinkedDataSubject<I>,
impl<T, B, I: Interpretation> LinkedDataPredicateObjects<I> for List<T, B>where
T: LinkedDataResource<I> + LinkedDataSubject<I>,
B: LinkedDataResource<I> + LinkedDataSubject<I>,
Source§fn visit_objects<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: PredicateObjectsVisitor<I>,
fn visit_objects<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: PredicateObjectsVisitor<I>,
Visits the objects this predicate points at.
Source§impl<T, B, I: Interpretation> LinkedDataResource<I> for List<T, B>
impl<T, B, I: Interpretation> LinkedDataResource<I> for List<T, B>
Source§fn interpretation(
&self,
_interpretation: &mut I,
) -> ResourceInterpretation<'_, I>
fn interpretation( &self, _interpretation: &mut I, ) -> ResourceInterpretation<'_, I>
Returns the interpretation of this resource, inserting it into
interpretation if required.Source§fn lexical_representation<'a>(
&'a self,
interpretation: &'a mut I,
) -> Option<CowRdfTerm<'a>>where
I: ReverseInterpretation + ReverseLocalInterpretation,
fn lexical_representation<'a>(
&'a self,
interpretation: &'a mut I,
) -> Option<CowRdfTerm<'a>>where
I: ReverseInterpretation + ReverseLocalInterpretation,
Returns the lexical term representing this resource, if any.
Source§fn reference_interpretation(
&self,
interpretation: &mut I,
) -> ResourceInterpretation<'_, I>
fn reference_interpretation( &self, interpretation: &mut I, ) -> ResourceInterpretation<'_, I>
Returns the interpretation to use when this resource appears as a
reference rather than as a subject with properties.
Source§impl<T, B, I: Interpretation> LinkedDataSubject<I> for List<T, B>where
T: LinkedDataResource<I> + LinkedDataSubject<I>,
B: LinkedDataResource<I> + LinkedDataSubject<I>,
impl<T, B, I: Interpretation> LinkedDataSubject<I> for List<T, B>where
T: LinkedDataResource<I> + LinkedDataSubject<I>,
B: LinkedDataResource<I> + LinkedDataSubject<I>,
Source§fn visit_subject<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: SubjectVisitor<I>,
fn visit_subject<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: SubjectVisitor<I>,
Visits the properties of the subject represented by this value.
Source§impl<T, B> Relabel<T, B> for List<T, B>
impl<T, B> Relabel<T, B> for List<T, B>
Source§fn relabel_with<N: VocabularyMut<Iri = T, BlankId = B>, G: LocalGenerator>(
&mut self,
vocabulary: &mut N,
generator: &mut G,
relabeling: &mut HashMap<B, ValidId<T, B>>,
) -> Result<(), GeneratedIdError>
fn relabel_with<N: VocabularyMut<Iri = T, BlankId = B>, G: LocalGenerator>( &mut self, vocabulary: &mut N, generator: &mut G, relabeling: &mut HashMap<B, ValidId<T, B>>, ) -> Result<(), GeneratedIdError>
Relabels every blank node, recording the mapping so shared nodes keep
the same new identifier. Read more
Auto Trait Implementations§
impl<T, B> Freeze for List<T, B>
impl<T, B> RefUnwindSafe for List<T, B>
impl<T, B> Send for List<T, B>
impl<T, B> Sync for List<T, B>
impl<T, B> Unpin for List<T, B>
impl<T, B> UnsafeUnpin for List<T, B>
impl<T, B> UnwindSafe for List<T, B>
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
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Views this value as an
Unordered reference.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
Checks if
self is equivalent to key.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.