[−][src]Struct elrond_wasm::call_data::CallDataDeserializer
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]
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, 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>,