pub trait SendsFor<Event>: SendEffects { }Expand description
Proof that send effects are lawful for one complete event type.
Ordinary communications are independent of Event. Interpreter requests
that return a local fact are not: their continuation must select an exact
member of Event. Composite products implement this trait structurally,
reindexing only their wrapped behavior effects through an outer event
injection.
An un-reindexed return to the emitter cannot be paired with an added outer event layer:
ⓘ
struct Request;
impl behavior::InterpreterRequest for Request {
type ReturnToEmitter = behavior::ReturnsToEmitter<u8, behavior::Here>;
type LogicalProtocols = behavior::NoBirthProtocols;
}
fn lawful<E, F: behavior::SendsFor<E>>() {}
type Inner = behavior::EventLayer<u8, behavior::User<behavior::MailAddr, ()>>;
type Outer = behavior::EventLayer<(), Inner>;
lawful::<Outer, behavior::InterpreterRequests<Request>>();Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.