pub trait Wire: Sized {
// Required methods
fn write(&self, w: &mut Writer<'_>);
fn read(r: &mut Reader<'_>) -> Option<Self>;
}Expand description
A value that crosses between wasm instances.
read returns None when the value can’t be read, after it records why
in the reader (Reader::fail): an Option takes less code to pass up
through the reads of a value’s parts than a Result does.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T: ?Sized> Wire for PhantomData<T>
impl<T: ?Sized> Wire for PhantomData<T>
Source§impl<T: Wire> Wire for Arc<T>
In full: values that cross once and then by key opt in with shared.
impl<T: Wire> Wire for Arc<T>
In full: values that cross once and then by key opt in with shared.