Struct byte_fmt::eval::ABList

source ·
pub struct ABList {
    pub lst: Vec<(Vec<u8, Global>, Option<Ctr>), Global>,
}
Expand description

a list of (bytes,ctr) components. It is an error for the lst to be empty.

Fields§

§lst: Vec<(Vec<u8, Global>, Option<Ctr>), Global>

Implementations§

source§

impl ABList

source

pub fn inner(&self) -> &[(Vec<u8, Global>, Option<Ctr>)]

source

pub fn items(self) -> impl Iterator<Item = ABItem<Vec<u8, Global>>>

source

pub fn item_refs(&self) -> impl Iterator<Item = ABItem<&[u8]>>

source

pub fn push(self, item: ABItem<Vec<u8, Global>>) -> ABList

source

pub fn push_bytes(self, b: &[u8]) -> ABList

source

pub fn push_ctr(self, ctr: Ctr) -> ABList

source

pub fn into_exact_bytes(self) -> Result<Vec<u8, Global>, ABList>

source

pub fn as_exact_bytes(&self) -> Result<&[u8], &ABList>

source

pub fn take_prefix_bytes(&mut self, v: usize) -> Vec<u8, Global>

source

pub fn concat(self) -> Vec<u8, Global>

Merges (bytes, ctr) into a sequence of bytes. this destroys ctr byte information. i.e. [(“/”,:)] becomes /: and reparsing becomes [(“”,/),(“”,:)] Use display to print propery escaped values.

source

pub fn bytes_2(&self) -> impl Iterator<Item = &[u8]>

source

pub fn is_empty(&self) -> bool

Trait Implementations§

source§

impl ABEValidator for ABList

source§

impl Clone for ABList

source§

fn clone(&self) -> ABList

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ABList

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for ABList

source§

fn default() -> ABList

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

impl Display for ABList

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl From<&[u8]> for ABList

source§

fn from(b: &[u8]) -> ABList

Converts to this type from the input type.
source§

impl<N> From<AB<N>> for ABListwhere AB<N>: AsRef<[u8]>,

source§

fn from(val: AB<N>) -> Self

Converts to this type from the input type.
source§

impl From<ABList> for Vec<ABE, Global>

source§

fn from(val: ABList) -> Vec<ABE, Global>

Converts to this type from the input type.
source§

impl From<ABList> for Vec<u8, Global>

source§

fn from(v: ABList) -> Vec<u8, Global>

Converts to this type from the input type.
source§

impl<N> From<B64<N>> for ABListwhere B64<N>: AsRef<[u8]>,

source§

fn from(val: B64<N>) -> Self

Converts to this type from the input type.
source§

impl From<LU128> for ABList

source§

fn from(value: LU128) -> ABList

Converts to this type from the input type.
source§

impl From<LU16> for ABList

source§

fn from(value: LU16) -> ABList

Converts to this type from the input type.
source§

impl From<LU32> for ABList

source§

fn from(value: LU32) -> ABList

Converts to this type from the input type.
source§

impl From<LU64> for ABList

source§

fn from(value: LU64) -> ABList

Converts to this type from the input type.
source§

impl From<U128> for ABList

source§

fn from(value: U128) -> ABList

Converts to this type from the input type.
source§

impl From<U16> for ABList

source§

fn from(value: U16) -> ABList

Converts to this type from the input type.
source§

impl From<U32> for ABList

source§

fn from(value: U32) -> ABList

Converts to this type from the input type.
source§

impl From<U64> for ABList

source§

fn from(value: U64) -> ABList

Converts to this type from the input type.
source§

impl From<U8> for ABList

source§

fn from(val: U8) -> Self

Converts to this type from the input type.
source§

impl From<Vec<u8, Global>> for ABList

source§

fn from(value: Vec<u8, Global>) -> ABList

Converts to this type from the input type.
source§

impl FromIterator<ABItem<Vec<u8, Global>>> for ABList

source§

fn from_iter<T>(iter: T) -> ABListwhere T: IntoIterator<Item = ABItem<Vec<u8, Global>>>,

Creates a value from an iterator. Read more
source§

impl IntoIterator for ABList

§

type Item = ABE

The type of the elements being iterated over.
§

type IntoIter = impl Iterator<Item = ABE>

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

fn into_iter(self) -> <ABList as IntoIterator>::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq<ABList> for ABList

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'o> TryFrom<&'o [ABE]> for ABList

§

type Error = &'o ABE

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

fn try_from( abe: &'o [ABE] ) -> Result<ABList, <ABList as TryFrom<&'o [ABE]>>::Error>

Performs the conversion.
source§

impl<const L: usize> TryFrom<ABList> for AB<[u8; L]>

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<const L: usize> TryFrom<ABList> for B64<[u8; L]>

§

type Error = DecodeError

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for LU128

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for LU16

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for LU32

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for LU64

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for U128

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for U16

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for U32

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for U64

§

type Error = FitSliceErr

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<ABList> for U8

§

type Error = TryFitSliceError

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

fn try_from(value: ABList) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl StructuralPartialEq for ABList

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.