Struct fuels_core::abi_decoder::ABIDecoder
source · [−]pub struct ABIDecoder;
Implementations
sourceimpl ABIDecoder
impl ABIDecoder
sourcepub fn decode(types: &[ParamType], data: &[u8]) -> Result<Vec<Token>, CodecError>
pub fn decode(types: &[ParamType], data: &[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.
pub fn decode_single(param: &ParamType, data: &[u8]) -> Result<Token, CodecError>
Auto Trait Implementations
impl RefUnwindSafe for ABIDecoder
impl Send for ABIDecoder
impl Sync for ABIDecoder
impl Unpin for ABIDecoder
impl UnwindSafe for ABIDecoder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more