Struct pwasm_std::WrappedArgs [] [src]

pub struct WrappedArgs { /* fields omitted */ }

Input data of a contract.

Basically it can be viewed as a byte slice (&[u8]) and it has Deref<Target=[u8]> impl indeed.

You should use parse_args to acquire WrappedArgs.

Examples

use pwasm_std::WrappedArgs;

fn takes_slice(input: &[u8]) {
    // ...
}

#[no_mangle]
pub fn call(descriptor: *mut u8) {
    let (input, result): (WrappedArgs, _) = unsafe { pwasm_std::parse_args(descriptor) };
    takes_slice(&input);
}

Trait Implementations

impl Deref for WrappedArgs
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl AsRef<[u8]> for WrappedArgs
[src]

[src]

Performs the conversion.