Skip to main content

List

Struct List 

Source
pub struct List<'field, N = Lower<Cow<'field, str>>> { /* private fields */ }

Implementations§

Source§

impl<'field, N> List<'field, N>

Source

pub fn new() -> Self

Source

pub fn is_empty(&self) -> bool

Source

pub fn len(&self) -> usize

Source

pub fn iter(&self) -> Iter<'_, (N, Value<Cow<'field, [u8]>>)> ⓘ

Source§

impl<'field, N: AsRef<[u8]>> List<'field, N>

Source

pub fn get(&self, name: &str) -> Option<&Value<Cow<'field, [u8]>>>

Source

pub fn contains_key(&self, name: &str) -> bool

Trait Implementations§

Source§

impl<N> Default for List<'_, N>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'field, N: Eq> Eq for List<'field, N>

Source§

impl<'a, 'field, N> IntoIterator for &'a List<'field, N>

Source§

type Item = &'a (N, Value<Cow<'field, [u8]>>)

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a, (N, Value<Cow<'field, [u8]>>)>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'field, N: PartialEq> PartialEq for List<'field, N>

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'input> Sink<'input> for List<'_>

Source§

type Error = Error

Source§

fn push( &mut self, name: &'input [u8], value: &'input [u8], ) -> Result<(), Self::Error>

Source§

fn entry(&mut self, field: Entry<'input>) -> Result<(), Self::Error>

Retains the scanner’s syntax proof when materializing an admitted field.
Source§

impl Source for List<'_>

Source§

fn emit<'field>(&'field self, sink: &mut impl Sink<'field>)

Source§

impl Source for List<'_, Name<Cow<'_, str>>>

Source§

fn emit<'field>(&'field self, sink: &mut impl Sink<'field>)

Source§

impl<'field, N: PartialEq> StructuralPartialEq for List<'field, N>

Auto Trait Implementations§

§

impl<'field, N> Forget for List<'field, N>

§

impl<'field, N> Freeze for List<'field, N>
where Vec<(N, Value<Cow<'field, [u8]>>)>: Freeze,

§

impl<'field, N> RefUnwindSafe for List<'field, N>
where Vec<(N, Value<Cow<'field, [u8]>>)>: RefUnwindSafe,

§

impl<'field, N> Send for List<'field, N>
where Vec<(N, Value<Cow<'field, [u8]>>)>: Send,

§

impl<'field, N> Sync for List<'field, N>
where Vec<(N, Value<Cow<'field, [u8]>>)>: Sync,

§

impl<'field, N> Unpin for List<'field, N>
where Vec<(N, Value<Cow<'field, [u8]>>)>: Unpin,

§

impl<'field, N> UnsafeUnpin for List<'field, N>
where Vec<(N, Value<Cow<'field, [u8]>>)>: UnsafeUnpin,

§

impl<'field, N> UnwindSafe for List<'field, N>
where Vec<(N, Value<Cow<'field, [u8]>>)>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Convert<T> for T

Source§

fn into(self) -> T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.