pub struct FairLossLink<P>(/* private fields */);Expand description
The link the book’s stack starts from: send it, and hope.
No retransmission, no deduplication, no timer, no state. What arrives, arrives.
Implementations§
Source§impl<P> FairLossLink<P>
impl<P> FairLossLink<P>
Trait Implementations§
Source§impl<P: Debug> Debug for FairLossLink<P>
impl<P: Debug> Debug for FairLossLink<P>
Source§impl<P: Default> Default for FairLossLink<P>
impl<P: Default> Default for FairLossLink<P>
Source§fn default() -> FairLossLink<P>
fn default() -> FairLossLink<P>
Returns the “default value” for a type. Read more
Source§impl<P: Clone> Link<P> for FairLossLink<P>
The fair-loss link satisfies the link port, and only its unscoped half.
impl<P: Clone> Link<P> for FairLossLink<P>
The fair-loss link satisfies the link port, and only its unscoped half.
It does not report scope boundaries because it cannot observe any — it holds no session, no epoch and no state whatever. A layer that repairs a scope ending gets nothing from this link, which is the honest outcome rather than a boundary invented to satisfy a bound.
Source§impl<P: Clone> Protocol for FairLossLink<P>
impl<P: Clone> Protocol for FairLossLink<P>
Source§type Scope = Infallible
type Scope = Infallible
No scope conditions. FLL1 to FLL3 are stated over correct processes and hold as long as one is correct; there is no session to end and nothing this link could report about one.
Source§type Meta = Infallible
type Meta = Infallible
Keeps nothing durably, because it keeps nothing at all.
Source§type Entry = Infallible
type Entry = Infallible
The durable entries this protocol appends: what accumulates.
Source§fn on_cmd(&mut self, _: Cmd<P>, cx: &mut ProtoCx<'_, Self>)
fn on_cmd(&mut self, _: Cmd<P>, cx: &mut ProtoCx<'_, Self>)
Handle a request from the layer above.
Source§fn on_msg(&mut self, from: NodeId, msg: P, cx: &mut ProtoCx<'_, Self>)
fn on_msg(&mut self, from: NodeId, msg: P, cx: &mut ProtoCx<'_, Self>)
Handle a message received from
from.Source§fn on_timer(&mut self, _id: TimerId, _cx: &mut ProtoCx<'_, Self>)
fn on_timer(&mut self, _id: TimerId, _cx: &mut ProtoCx<'_, Self>)
Handle a timer that fired somewhere in this protocol or in what it composes. Read more
§fn on_init(
&mut self,
_cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>,
)
fn on_init( &mut self, _cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>, )
Begin, on a first start — when nothing has been written down. Read more
§fn on_recovery(
&mut self,
_cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>,
)
fn on_recovery( &mut self, _cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>, )
Resume after a crash, reading what survived. Read more
§fn on_scope_event(
&mut self,
_scope: Self::Scope,
_cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>,
)
fn on_scope_event( &mut self, _scope: Self::Scope, _cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>, )
Handle a boundary of a scope this protocol’s guarantees depend on — its end, or the
beginning of the one that succeeds it. Read more
Auto Trait Implementations§
impl<P> Freeze for FairLossLink<P>
impl<P> RefUnwindSafe for FairLossLink<P>
impl<P> Send for FairLossLink<P>
impl<P> Sync for FairLossLink<P>
impl<P> Unpin for FairLossLink<P>
impl<P> UnsafeUnpin for FairLossLink<P>
impl<P> UnwindSafe for FairLossLink<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more