pub struct ABIDecoder {}
Implementations§
Source§impl ABIDecoder
impl ABIDecoder
pub fn new() -> ABIDecoder
Sourcepub fn decode<'a>(
&mut self,
types: &[ParamType],
data: &'a [u8],
) -> Result<Vec<Token>, CodecError>
pub fn decode<'a>( &mut self, types: &[ParamType], data: &'a [u8], ) -> Result<Vec<Token>, CodecError>
Decode takes an array of ParamType
and the encoded data as raw bytes
and returns a vector of Token
s containing the decoded values.
Note that the order of the types in the types
array needs to match the order
of the expected values/types in data
.
You can find comprehensive examples in the tests for this module.
Trait Implementations§
Source§impl Clone for ABIDecoder
impl Clone for ABIDecoder
Source§fn clone(&self) -> ABIDecoder
fn clone(&self) -> ABIDecoder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ABIDecoder
impl Debug for ABIDecoder
impl Copy for ABIDecoder
Auto Trait Implementations§
impl Freeze for ABIDecoder
impl RefUnwindSafe for ABIDecoder
impl Send for ABIDecoder
impl Sync for ABIDecoder
impl Unpin for ABIDecoder
impl UnwindSafe for ABIDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> FlattenInto<U> for Twhere
U: FlattenFrom<T>,
impl<T, U> FlattenInto<U> for Twhere
U: FlattenFrom<T>,
fn flatten_into(self) -> U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more