[][src]Struct elrond_wasm::call_data::CallDataDeserializer

pub struct CallDataDeserializer<'a> { /* fields omitted */ }

Deserializes from Elrond's smart contract call format.

This format consists of the function name, followed by '@', follwed by hex-encoded argument bytes separated by '@' characters. Example: "funcName@00000@aaaa@1234@@". Arguments can be empty. Argument hex encodings must always have an even number of digits.

CallDataDeserializer borrows its input and will allocate new Vecs for each output.

Converting from bytes to specific argument types is not in scope. Use the serializer module for that.

Implementations

impl<'a> CallDataDeserializer<'a>[src]

pub fn new(source: &'a [u8]) -> Self[src]

pub fn get_func_name(&self) -> &'a [u8][src]

Gets the first component of the call data, which is the function name. Unlike the arguments, this can be called at any time.

pub fn has_next(&self) -> bool[src]

pub fn next_argument(&mut self) -> Result<Option<Vec<u8>>, SCError>[src]

Gets the next argument, deserializes from hex and returns the resulting bytes.

Auto Trait Implementations

impl<'a> Send for CallDataDeserializer<'a>

impl<'a> Sync for CallDataDeserializer<'a>

impl<'a> Unpin for CallDataDeserializer<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.