Struct rlp::Rlp [−][src]
pub struct Rlp<'a> { /* fields omitted */ }
Data-oriented view onto rlp-slice.
This is an immutable structure. No operations change it.
Should be used in places where, error handling is required, eg. on input
Methods
impl<'a, 'view> Rlp<'a> where
'a: 'view,
[src]
impl<'a, 'view> Rlp<'a> where
'a: 'view,
pub fn new(bytes: &'a [u8]) -> Rlp<'a>
[src]
pub fn new(bytes: &'a [u8]) -> Rlp<'a>
pub fn as_raw(&'view self) -> &'a [u8]
[src]
pub fn as_raw(&'view self) -> &'a [u8]
pub fn prototype(&self) -> Result<Prototype, DecoderError>
[src]
pub fn prototype(&self) -> Result<Prototype, DecoderError>
pub fn payload_info(&self) -> Result<PayloadInfo, DecoderError>
[src]
pub fn payload_info(&self) -> Result<PayloadInfo, DecoderError>
pub fn data(&'view self) -> Result<&'a [u8], DecoderError>
[src]
pub fn data(&'view self) -> Result<&'a [u8], DecoderError>
pub fn item_count(&self) -> Result<usize, DecoderError>
[src]
pub fn item_count(&self) -> Result<usize, DecoderError>
pub fn size(&self) -> usize
[src]
pub fn size(&self) -> usize
pub fn at(&'view self, index: usize) -> Result<Rlp<'a>, DecoderError>
[src]
pub fn at(&'view self, index: usize) -> Result<Rlp<'a>, DecoderError>
pub fn is_null(&self) -> bool
[src]
pub fn is_null(&self) -> bool
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
pub fn is_list(&self) -> bool
[src]
pub fn is_list(&self) -> bool
pub fn is_data(&self) -> bool
[src]
pub fn is_data(&self) -> bool
pub fn is_int(&self) -> bool
[src]
pub fn is_int(&self) -> bool
ⓘImportant traits for RlpIterator<'a, 'view>pub fn iter(&'view self) -> RlpIterator<'a, 'view>
[src]
ⓘImportant traits for RlpIterator<'a, 'view>
pub fn iter(&'view self) -> RlpIterator<'a, 'view>
pub fn as_val<T>(&self) -> Result<T, DecoderError> where
T: Decodable,
[src]
pub fn as_val<T>(&self) -> Result<T, DecoderError> where
T: Decodable,
pub fn as_list<T>(&self) -> Result<Vec<T>, DecoderError> where
T: Decodable,
[src]
pub fn as_list<T>(&self) -> Result<Vec<T>, DecoderError> where
T: Decodable,
pub fn val_at<T>(&self, index: usize) -> Result<T, DecoderError> where
T: Decodable,
[src]
pub fn val_at<T>(&self, index: usize) -> Result<T, DecoderError> where
T: Decodable,
pub fn list_at<T>(&self, index: usize) -> Result<Vec<T>, DecoderError> where
T: Decodable,
[src]
pub fn list_at<T>(&self, index: usize) -> Result<Vec<T>, DecoderError> where
T: Decodable,
pub fn decoder(&self) -> BasicDecoder
[src]
pub fn decoder(&self) -> BasicDecoder
Trait Implementations
impl<'a> Debug for Rlp<'a>
[src]
impl<'a> Debug for Rlp<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a> Clone for Rlp<'a>
[src]
impl<'a> Clone for Rlp<'a>
fn clone(&self) -> Rlp<'a>
[src]
fn clone(&self) -> Rlp<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<'a> Display for Rlp<'a>
[src]
impl<'a> Display for Rlp<'a>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<'a, 'view> IntoIterator for &'view Rlp<'a> where
'a: 'view,
[src]
impl<'a, 'view> IntoIterator for &'view Rlp<'a> where
'a: 'view,