Skip to main content

Decoded

Struct Decoded 

Source
pub struct Decoded<S = Span<Plain<Layout>, Owned, Frozen>> { /* private fields */ }

Implementations§

Source§

impl Decoded

Source

pub fn try_from(storage: Span) -> Result<Self, Fault>

Validates arbitrary storage once before exposing infallible iteration.

Source§

impl<S: AsRef<[u8]>> Decoded<S>

Source

pub fn iter(&self) -> Iter<'_> ⓘ

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn get(&self, name: &[u8]) -> Option<&[u8]>

Source

pub fn as_bytes(&self) -> &[u8] ⓘ

Source

pub fn ranges(&self) -> RangeIter<'_> ⓘ

Source

pub fn try_to_owned(&self) -> Result<Vec<Owned>, Error>

Source§

impl<'id> Decoded<Owner<'id, Span<Plain<Layout>, Owned, Frozen>>>

Source

pub fn view(&self) -> View<'_, 'id>

Trait Implementations§

Source§

impl<S: AsRef<[u8]>> AsRef<[u8]> for Decoded<S>

Source§

fn as_ref(&self) -> &[u8] ⓘ

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<S: Debug> Debug for Decoded<S>

Source§

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

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

impl Eq for Decoded

Source§

impl<'id> From<Decoded<Owner<'id, Span<Plain, Owned, Frozen>>>> for Owner<'id, Shared>

Source§

fn from(head: Decoded<Owner<'id, Span<Plain<Layout>, Owned, Frozen>>>) -> Self

Converts to this type from the input type.
Source§

impl From<Decoded> for Shared

Source§

fn from(value: Decoded) -> Self

Converts to this type from the input type.
Source§

impl<'a> IntoIterator for &'a Decoded

Source§

type Item = Entry<'a>

The type of the elements being iterated over.
Source§

type IntoIter = Iter<'a>

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 Metadata for Decoded

Source§

type Iter<'a> = Iter<'a>

Source§

fn fields(&self) -> Self::Iter<'_>

Source§

impl PartialEq for Decoded

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

Auto Trait Implementations§

§

impl<S> Freeze for Decoded<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for Decoded<S>
where S: RefUnwindSafe,

§

impl<S> Send for Decoded<S>
where S: Send,

§

impl<S> Sync for Decoded<S>
where S: Sync,

§

impl<S> Unpin for Decoded<S>
where S: Unpin,

§

impl<S> UnsafeUnpin for Decoded<S>
where S: UnsafeUnpin,

§

impl<S> UnwindSafe for Decoded<S>
where S: 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> Source for T
where T: AsRef<[u8]> + Seal,

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.