Derive Macro sp_runtime_interface::pass_by::PassByInner [−][src]
#[derive(PassByInner)]
Expand description
Derive macro for implementing PassBy
with the Inner
strategy.
Besides implementing PassBy
, this derive also implements the helper trait PassByInner
.
The type is required to be a struct with just one field. The field type needs to implement the required traits to pass it between the wasm and the native side. (See the runtime interface crate for more information about these traits.)
Example
#[derive(PassByInner)] struct Data([u8; 32]);
#[derive(PassByInner)] struct Data { data: [u8; 32], }