Skip to main content

LogicalDeliveryProtocols

Trait LogicalDeliveryProtocols 

Source
pub trait LogicalDeliveryProtocols: SendEffects {
    type Protocols: BirthProtocolProduct;
}
Expand description

Static projection of intentional logical destinations from one concrete sends product.

Implementations mirror the product’s InterpretSends traversal without inspecting values. Only Delivery<P> contributes P; exact established deliveries, creator-local child deliveries and inputs, and interpreter requests contribute nothing. Named products append their field projections in interpretation order, preserving repeated protocol occurrences.

Custom named sends products must implement this trait explicitly. There is deliberately no blanket Vec<T> implementation that could silently treat an unknown delivery representation as having no logical destination.

ⓘ
struct OpaqueSends;
impl behavior::SendEffects for OpaqueSends {
    fn empty() -> Self { Self }
    fn append(&mut self, _: Self) {}
}
impl<E> behavior::SendsFor<E> for OpaqueSends {}
struct Actor;
impl behavior::Protocol for Actor { type Addr = behavior::MailAddr; type Msg = (); }
impl behavior::Behavior for Actor {
    type Protocol = Self;
    type Event = behavior::User<behavior::MailAddr, ()>;
    type Sends = OpaqueSends;
    type Ph = behavior::Never;
    type Error = behavior::Never;
    type Birth = behavior::NoBirths;
    fn transition(&mut self, _: behavior::ActiveTurn, _: Self::Event)
        -> behavior::BehaviorActed<Self> { Ok(behavior::Actions::cont()) }
}
fn require_complete<B: behavior::LogicalHostRequirements>() {}
require_complete::<Actor>();

Required Associated Types§

Source

type Protocols: BirthProtocolProduct

Ordered, duplicate-preserving logical protocol occurrences.

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.

Implementations on Foreign Types§

Source§

impl LogicalDeliveryProtocols for Vec<Never>

Source§

impl<Child, Source, Input, Occurrence> LogicalDeliveryProtocols for Vec<ChildInput<Child, Source, Input, Occurrence>>
where Child: Behavior,

Source§

impl<P> LogicalDeliveryProtocols for Vec<EstablishedDelivery<P>>

Source§

impl<P: Protocol> LogicalDeliveryProtocols for Vec<Delivery<P>>

Source§

impl<P: Protocol, Occurrence> LogicalDeliveryProtocols for Vec<ChildDelivery<P, Occurrence>>

Implementors§