[][src]Trait elrond_codec::TopDecodeInput

pub trait TopDecodeInput: Sized {
    pub fn byte_len(&self) -> usize;
pub fn into_boxed_slice_u8(self) -> Box<[u8]>; pub fn into_u64(self) -> u64 { ... }
pub fn into_i64(self) -> i64 { ... } }

Trait that abstracts away an underlying API for a top-level object deserializer. The underlying API can provide pre-parsed i64/u64 or pre-bundled boxed slices.

Required methods

pub fn byte_len(&self) -> usize[src]

Length of the underlying data, in bytes.

pub fn into_boxed_slice_u8(self) -> Box<[u8]>[src]

Provides the underlying data as an owned byte slice box. Consumes the input object in the process.

Loading content...

Provided methods

pub fn into_u64(self) -> u64[src]

Retrieves the underlying data as a pre-parsed u64. Expected to panic if the conversion is not possible.

Consumes the input object in the process.

pub fn into_i64(self) -> i64[src]

Retrieves the underlying data as a pre-parsed i64. Expected to panic if the conversion is not possible.

Consumes the input object in the process.

Loading content...

Implementations on Foreign Types

impl TopDecodeInput for Box<[u8]>[src]

Loading content...

Implementors

impl TopDecodeInput for Vec<u8>[src]

impl<'a> TopDecodeInput for &'a [u8][src]

Loading content...