load_bytes

Function load_bytes 

Source
pub fn load_bytes() -> Result<Vec<u8>, Error>
Expand description

Get a payload of the message that is currently being processed.

This function returns the message’s payload as a byte vector.

§Examples

use gstd::msg;

#[unsafe(no_mangle)]
extern "C" fn handle() {
    let payload = msg::load_bytes().expect("Unable to load");
}

§See also

  • load function returns a decoded payload of a custom type.