Struct rlp::UntrustedRlp
[−]
[src]
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
Trait Implementations
impl<'a> Debug for UntrustedRlp<'a>
[src]
impl<'a> Clone for UntrustedRlp<'a>
[src]
fn clone(&self) -> UntrustedRlp<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<'a> Display for UntrustedRlp<'a>
[src]
impl<'a, 'view> View<'a, 'view> for UntrustedRlp<'a> where 'a: 'view
[src]
type Prototype = Result<Prototype, DecoderError>
RLP prototype type
type PayloadInfo = Result<PayloadInfo, DecoderError>
Payload info type
type Data = Result<&'a [u8], DecoderError>
Data type
type Item = Result<UntrustedRlp<'a>, DecoderError>
Item type
type Iter = UntrustedRlpIterator<'a, 'view>
Iterator type
fn new(bytes: &'a [u8]) -> UntrustedRlp<'a>
Creates a new instance of Rlp
reader
fn as_raw(&'view self) -> &'a [u8]
The raw data of the RLP as slice. Read more
fn prototype(&self) -> Self::Prototype
Get the prototype of the RLP.
fn payload_info(&self) -> Self::PayloadInfo
Get payload info.
fn data(&'view self) -> Self::Data
Get underlieing data.
fn item_count(&self) -> usize
Returns number of RLP items. Read more
fn size(&self) -> usize
Returns the number of bytes in the data, or zero if it isn't data. Read more
fn at(&'view self, index: usize) -> Self::Item
Get view onto RLP-slice at index. Read more
fn is_null(&self) -> bool
No value Read more
fn is_empty(&self) -> bool
Contains a zero-length string or zero-length list. Read more
fn is_list(&self) -> bool
List value Read more
fn is_data(&self) -> bool
String value Read more
fn is_int(&self) -> bool
Int value Read more
fn iter(&'view self) -> Self::Iter
Get iterator over rlp-slices Read more
fn as_val<T>(&self) -> Result<T, DecoderError> where T: RlpDecodable
Decode data into an object
fn val_at<T>(&self, index: usize) -> Result<T, DecoderError> where T: RlpDecodable
Decode data at given list index into an object
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?
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more