Trait crux_core::Effect

source ·
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§

source

type Ffi: Serialize

Ffi is an enum with variants corresponding to the Effect variants but instead of carrying a Request<Op> they carry the Op directly

Required Methods§

source

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

Implementors§