Skip to main content

Decoded

Struct Decoded 

Source
pub struct Decoded<S = Span, const PREFIX: usize = 0> { /* 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<const PREFIX: usize> Decoded<Span, PREFIX>

Source

pub fn into_lease(self) -> Span

Consumes the record proof and returns its exclusively owned storage.

Source§

impl<S: AsRef<[u8]>, const PREFIX: usize> Decoded<S, PREFIX>

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, const PREFIX: usize> Decoded<Owner<'id, Span<Plain<Layout>, Owned, Frozen>>, PREFIX>

Source

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

Trait Implementations§

Source§

impl<S: AsRef<[u8]>, const PREFIX: usize> AsRef<[u8]> for Decoded<S, PREFIX>

Source§

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

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

impl<S: Debug, const PREFIX: usize> Debug for Decoded<S, PREFIX>

Source§

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

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

impl<const PREFIX: usize> Eq for Decoded<Span, PREFIX>

Source§

impl<'id, const PREFIX: usize> From<Decoded<Owner<'id, Span<Plain, Owned, Frozen>>, PREFIX>> for Owner<'id, Shared>

Source§

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

Converts to this type from the input type.
Source§

impl<const PREFIX: usize> From<Decoded<Span, PREFIX>> for Shared

Source§

fn from(value: Decoded<Span, PREFIX>) -> Self

Converts to this type from the input type.
Source§

impl<'a, const PREFIX: usize> IntoIterator for &'a Decoded<Span, PREFIX>

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<const PREFIX: usize> Metadata for Decoded<Span, PREFIX>

Source§

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

Source§

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

Source§

impl<const PREFIX: usize> PartialEq for Decoded<Span, PREFIX>

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, const PREFIX: usize> Forget for Decoded<S, PREFIX>

§

impl<S, const PREFIX: usize> Freeze for Decoded<S, PREFIX>
where S: Freeze,

§

impl<S, const PREFIX: usize> RefUnwindSafe for Decoded<S, PREFIX>
where S: RefUnwindSafe,

§

impl<S, const PREFIX: usize> Send for Decoded<S, PREFIX>
where S: Send,

§

impl<S, const PREFIX: usize> Sync for Decoded<S, PREFIX>
where S: Sync,

§

impl<S, const PREFIX: usize> Unpin for Decoded<S, PREFIX>
where S: Unpin,

§

impl<S, const PREFIX: usize> UnsafeUnpin for Decoded<S, PREFIX>
where S: UnsafeUnpin,

§

impl<S, const PREFIX: usize> UnwindSafe for Decoded<S, PREFIX>
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.