Skip to main content

SendsFor

Trait SendsFor 

Source
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".

Implementations on Foreign Types§

Source§

impl<Event, T> SendsFor<Event> for Vec<T>

Implementors§

Source§

impl<Event, Item> SendsFor<Event> for SourceActions<Item>
where Item: SourceAction,

Source§

impl<Event, M> SendsFor<Event> for InterpreterRequests<M>
where M: InterpreterRequest, M::ReturnToEmitter: ReturnToEmitterFor<Event>,

Source§

impl<Event, OwnedEffects, InnerEffects> SendsFor<Event> for SendLayer<OwnedEffects, InnerEffects>
where Event: ComposedEvent, OwnedEffects: SendsFor<Event>, InnerEffects: SendsFor<Event::Inner>,

Source§

impl<Event> SendsFor<Event> for NoSends