[][src]Struct rlp::UntrustedRlp

pub struct UntrustedRlp<'a> { /* fields omitted */ }

Data-oriented view onto rlp-slice.

This is immutable structere. No operations change it.

Should be used in places where, error handling is required, eg. on input

Implementations

impl<'a, 'view> UntrustedRlp<'a> where
    'a: 'view, 
[src]

pub fn new(bytes: &'a [u8]) -> UntrustedRlp<'a>[src]

pub fn as_raw(&'view self) -> &'a [u8][src]

pub fn prototype(&self) -> Result<Prototype, DecoderError>[src]

pub fn payload_info(&self) -> Result<PayloadInfo, DecoderError>[src]

pub fn data(&'view self) -> Result<&'a [u8], DecoderError>[src]

pub fn item_count(&self) -> Result<usize, DecoderError>[src]

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

pub fn at(&'view self, index: usize) -> Result<UntrustedRlp<'a>, DecoderError>[src]

pub fn is_null(&self) -> bool[src]

pub fn is_empty(&self) -> bool[src]

pub fn is_list(&self) -> bool[src]

pub fn is_data(&self) -> bool[src]

pub fn is_int(&self) -> bool[src]

pub fn iter(&'view self) -> UntrustedRlpIterator<'a, 'view>

Notable traits for UntrustedRlpIterator<'a, 'view>

impl<'a, 'view> Iterator for UntrustedRlpIterator<'a, 'view> type Item = UntrustedRlp<'a>;
[src]

pub fn as_val<T>(&self) -> Result<T, DecoderError> where
    T: Decodable
[src]

pub fn as_list<T>(&self) -> Result<Vec<T>, DecoderError> where
    T: Decodable
[src]

pub fn val_at<T>(&self, index: usize) -> Result<T, DecoderError> where
    T: Decodable
[src]

pub fn list_at<T>(&self, index: usize) -> Result<Vec<T>, DecoderError> where
    T: Decodable
[src]

pub fn decoder(&self) -> BasicDecoder<'_>[src]

Trait Implementations

impl<'a> Clone for UntrustedRlp<'a>[src]

impl<'a> Compressible for UntrustedRlp<'a>[src]

type DataType = RlpType

Indicates the origin of RLP to be compressed.

impl<'a> Debug for UntrustedRlp<'a>[src]

impl<'a> Display for UntrustedRlp<'a>[src]

impl<'a> From<UntrustedRlp<'a>> for Rlp<'a>[src]

impl<'a, 'view> IntoIterator for &'view UntrustedRlp<'a> where
    'a: 'view, 
[src]

type Item = UntrustedRlp<'a>

The type of the elements being iterated over.

type IntoIter = UntrustedRlpIterator<'a, 'view>

Which kind of iterator are we turning this into?

Auto Trait Implementations

impl<'a> !RefUnwindSafe for UntrustedRlp<'a>

impl<'a> Send for UntrustedRlp<'a>

impl<'a> !Sync for UntrustedRlp<'a>

impl<'a> Unpin for UntrustedRlp<'a>

impl<'a> UnwindSafe for UntrustedRlp<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.