Struct sputnikvm_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
Methods
impl<'a, 'view> UntrustedRlp<'a> where
'a: 'view,
[src]
'a: 'view,
fn new(bytes: &'a [u8]) -> UntrustedRlp<'a>
fn as_raw(&'view self) -> &'a [u8]
fn prototype(&self) -> Result<Prototype, DecoderError>
fn payload_info(&self) -> Result<PayloadInfo, DecoderError>
fn data(&'view self) -> Result<&'a [u8], DecoderError>
fn item_count(&self) -> Result<usize, DecoderError>
fn size(&self) -> usize
fn at(&'view self, index: usize) -> Result<UntrustedRlp<'a>, DecoderError>
fn is_null(&self) -> bool
fn is_empty(&self) -> bool
fn is_list(&self) -> bool
fn is_data(&self) -> bool
fn is_int(&self) -> bool
fn iter(&'view self) -> UntrustedRlpIterator<'a, 'view>
fn as_val<T>(&self) -> Result<T, DecoderError> where
T: Decodable,
T: Decodable,
fn as_list<T>(&self) -> Result<Vec<T>, DecoderError> where
T: Decodable,
T: Decodable,
fn val_at<T>(&self, index: usize) -> Result<T, DecoderError> where
T: Decodable,
T: Decodable,
fn list_at<T>(&self, index: usize) -> Result<Vec<T>, DecoderError> where
T: Decodable,
T: Decodable,
fn decoder(&self) -> BasicDecoder
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]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<'a, 'view> IntoIterator for &'view UntrustedRlp<'a> where
'a: 'view,
[src]
'a: 'view,
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
impl<'a> Compressible for UntrustedRlp<'a>
[src]
type DataType = RlpType
Indicates the origin of RLP to be compressed.
fn compress(&self, t: RlpType) -> ElasticArray1024<u8>
Compress given RLP type using appropriate methods.
fn decompress(&self, t: RlpType) -> ElasticArray1024<u8>
Decompress given RLP type using appropriate methods.