Expand description

Provides the PassBy trait to simplify the implementation of the runtime interface traits for custom types.

Codec, Inner and Enum are the provided strategy implementations.

Structs

  • The implementation of the pass by codec strategy. This strategy uses a SCALE encoded representation of the type between wasm and the host.
  • The implementation of the pass by enum strategy. This strategy uses an u8 internally to pass the enum between wasm and the host. So, this strategy only supports enums with unit variants.
  • The implementation of the pass by inner type strategy. The type that uses this strategy will be passed between wasm and the host by using the wrapped inner type. So, this strategy is only usable by newtype structs.

Traits

  • Something that should be passed between wasm and the host using the given strategy.
  • Something that provides a strategy for passing a type between wasm and the host.
  • Trait that needs to be implemented by a type that should be passed between wasm and the host, by using the inner type. See Inner for more information.

Derive Macros