pub trait CustomEffect:
Serialize
+ DeserializeOwned
+ WasmCompatSend
+ 'static {
type Answer: Serialize + DeserializeOwned + WasmCompatSend + 'static;
const KIND: &'static str;
}Expand description
A host’s own effect, typed the way a ToolContext value is: a
declared kind label and a declared answer type, both serde. The wire
form is EffectKind::Custom / Outcome::Custom; the type never
crosses it.
Required Associated Constants§
Sourceconst KIND: &'static str
const KIND: &'static str
The kind label this effect dispatches under; a handler’s
FamilyDescriptor::Custom must name the same label.
Required Associated Types§
Sourcetype Answer: Serialize + DeserializeOwned + WasmCompatSend + 'static
type Answer: Serialize + DeserializeOwned + WasmCompatSend + 'static
What the handler answers.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".