pub trait Effect: Send + 'static {
type Ffi: Serialize;
// Required method
fn serialize(self) -> (Self::Ffi, ResolveSerialized);
}
Expand description
Implemented automatically with the Effect macro from crux_macros
.
This is used by the Bridge
to serialize effects going across the
FFI boundary.
Required Associated Types§
Required Methods§
sourcefn serialize(self) -> (Self::Ffi, ResolveSerialized)
fn serialize(self) -> (Self::Ffi, ResolveSerialized)
Converts the Effect
into its FFI counterpart and returns it alongside
a deserializing version of the resolve callback for the request that the
original Effect
was carrying.
You should not need to call this method directly. It is called by
the Bridge