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.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn entry(&self) -> &[IndexedObject<T, B>] ⓘ
pub fn entry(&self) -> &[IndexedObject<T, B>] ⓘ
Returns a reference to the “@list” entry of the list object.
Alias for as_slice
.
pub fn entry_mut(&mut self) -> &mut Vec<IndexedObject<T, B>> ⓘ
pub fn as_slice(&self) -> &[IndexedObject<T, B>] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [IndexedObject<T, B>] ⓘ
pub fn into_entry(self) -> Vec<IndexedObject<T, B>> ⓘ
pub fn push(&mut self, object: IndexedObject<T, B>)
pub fn pop(&mut self) -> Option<IndexedObject<T, B>>
pub fn iter(&self) -> Iter<'_, IndexedObject<T, B>>
pub fn iter_mut(&mut self) -> IterMut<'_, IndexedObject<T, B>>
Sourcepub fn canonicalize_with(&mut self, buffer: &mut Buffer)
pub fn canonicalize_with(&mut self, buffer: &mut Buffer)
Puts this list object literals into canonical form using the given
buffer
.
The buffer is used to compute the canonical form of numbers.
Sourcepub fn canonicalize(&mut self)
pub fn canonicalize(&mut self)
Puts this list object literals into canonical form.
Trait Implementations§
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>
fn into_json_with(self, vocabulary: &N) -> Value
Source§impl<T, B, V, I: Interpretation> LinkedData<I, V> for List<T, B>where
T: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
B: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
V: IriVocabularyMut + Vocabulary<Iri = T>,
impl<T, B, V, I: Interpretation> LinkedData<I, V> for List<T, B>where
T: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
B: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
V: IriVocabularyMut + Vocabulary<Iri = T>,
Source§impl<T, B, V, I: Interpretation> LinkedDataGraph<I, V> for List<T, B>where
T: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
B: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
V: IriVocabularyMut + Vocabulary<Iri = T>,
impl<T, B, V, I: Interpretation> LinkedDataGraph<I, V> for List<T, B>where
T: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
B: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
V: IriVocabularyMut + Vocabulary<Iri = T>,
fn visit_graph<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: GraphVisitor<I, V>,
Source§impl<T, B, V, I: Interpretation> LinkedDataPredicateObjects<I, V> for List<T, B>where
T: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
B: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
V: IriVocabularyMut + Vocabulary<Iri = T>,
impl<T, B, V, I: Interpretation> LinkedDataPredicateObjects<I, V> for List<T, B>where
T: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
B: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
V: IriVocabularyMut + Vocabulary<Iri = T>,
fn visit_objects<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: PredicateObjectsVisitor<I, V>,
Source§impl<T, B, V: Vocabulary, I: Interpretation> LinkedDataResource<I, V> for List<T, B>
impl<T, B, V: Vocabulary, I: Interpretation> LinkedDataResource<I, V> for List<T, B>
fn interpretation( &self, _vocabulary: &mut V, _interpretation: &mut I, ) -> ResourceInterpretation<'_, I, V>
fn lexical_representation<'a>(
&'a self,
vocabulary: &'a mut V,
interpretation: &'a mut I,
) -> Option<CowRdfTerm<'a, V>>where
I: ReverseTermInterpretation<Iri = <V as IriVocabulary>::Iri, BlankId = <V as BlankIdVocabulary>::BlankId, Literal = <V as LiteralVocabulary>::Literal>,
fn reference_interpretation( &self, vocabulary: &mut V, interpretation: &mut I, ) -> ResourceInterpretation<'_, I, V>
Source§impl<T, B, V, I: Interpretation> LinkedDataSubject<I, V> for List<T, B>where
T: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
B: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
V: IriVocabularyMut + Vocabulary<Iri = T>,
impl<T, B, V, I: Interpretation> LinkedDataSubject<I, V> for List<T, B>where
T: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
B: LinkedDataResource<I, V> + LinkedDataSubject<I, V>,
V: IriVocabularyMut + Vocabulary<Iri = T>,
fn visit_subject<S>(&self, visitor: S) -> Result<S::Ok, S::Error>where
S: SubjectVisitor<I, V>,
Source§impl<T, B> Relabel<T, B> for List<T, B>
impl<T, B> Relabel<T, B> for List<T, B>
impl<T, B> Eq for List<T, B>
Auto Trait Implementations§
impl<T, B> Freeze for List<T, B>
impl<T, B> RefUnwindSafe for List<T, B>where
T: RefUnwindSafe,
B: RefUnwindSafe,
impl<T, B> Send for List<T, B>
impl<T, B> Sync for List<T, B>
impl<T, B> Unpin for List<T, B>where
T: Unpin,
impl<T, B> UnwindSafe for List<T, B>where
T: UnwindSafe,
B: 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> 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.