[−][src]Struct rlp::UntrustedRlp
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]
'a: 'view,
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]
Notable traits for UntrustedRlpIterator<'a, 'view>
impl<'a, 'view> Iterator for UntrustedRlpIterator<'a, 'view> type Item = UntrustedRlp<'a>;
pub fn as_val<T>(&self) -> Result<T, DecoderError> where
T: Decodable,
[src]
T: Decodable,
pub fn as_list<T>(&self) -> Result<Vec<T>, DecoderError> where
T: Decodable,
[src]
T: Decodable,
pub fn val_at<T>(&self, index: usize) -> Result<T, DecoderError> where
T: Decodable,
[src]
T: Decodable,
pub fn list_at<T>(&self, index: usize) -> Result<Vec<T>, DecoderError> where
T: Decodable,
[src]
T: Decodable,
pub fn decoder(&self) -> BasicDecoder<'_>
[src]
Trait Implementations
impl<'a> Clone for UntrustedRlp<'a>
[src]
fn clone(&self) -> UntrustedRlp<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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>
[src]
fn decompress(&self, t: RlpType) -> ElasticArray1024<u8>
[src]
impl<'a> Debug for UntrustedRlp<'a>
[src]
impl<'a> Display for UntrustedRlp<'a>
[src]
impl<'a> From<UntrustedRlp<'a>> for Rlp<'a>
[src]
fn from(rlp: UntrustedRlp<'a>) -> Rlp<'a>
[src]
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
[src]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,