Skip to main content

ProtoEffect

Type Alias ProtoEffect 

Source
pub type ProtoEffect<P> = Effect<<P as Protocol>::Msg, <P as Protocol>::Ind>;
Expand description

The effect type for a given protocol.

Aliased Type§

pub enum ProtoEffect<P> {
    Send {
        to: NodeId,
        msg: <P as Protocol>::Msg,
    },
    Indicate(<P as Protocol>::Ind),
    SetTimer {
        after: Duration,
        id: TimerId,
    },
}

Variants§

§

Send

Transmit msg to to. Best-effort: the layer below may lose it.

Fields

§msg: <P as Protocol>::Msg
§

Indicate(<P as Protocol>::Ind)

Raise an indication to the layer above — the protocol delivering on its guarantee.

§

SetTimer

Request that id be handed back after after has elapsed.

Fields

§after: Duration