pub trait OptionIntoWasmAbi: IntoWasmAbi {
// Required method
fn none() -> Self::Abi;
}
Expand description
Indicates that this type can be passed to JS as Option<Self>
.
This trait is used when implementing IntoWasmAbi for Option<T>
.
§⚠️ Unstable
This is part of the internal convert
module, no
stability guarantees are provided. Use at your own risk. See its
documentation for more details.
Returns an ABI instance indicating “none”, which JS will interpret as
the None
branch of this option.
It should be guaranteed that the IntoWasmAbi
can never produce the ABI
value returned here.