Trait crux_core::Effect

source ·
pub trait Effect: Send + 'static {
    type Ffi: Serialize;

    // Required method
    fn serialize(self) -> (Self::Ffi, ResolveBytes);
}
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, ResolveBytes)

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.

Implementors§