pub struct SessionLink<P> { /* private fields */ }Expand description
Reliable ordered delivery within a session, and honesty across one.
Implementations§
Source§impl<P> SessionLink<P>
impl<P> SessionLink<P>
Trait Implementations§
Source§impl<P: Debug> Debug for SessionLink<P>
impl<P: Debug> Debug for SessionLink<P>
Source§impl<P: Default> Default for SessionLink<P>
impl<P: Default> Default for SessionLink<P>
Source§fn default() -> SessionLink<P>
fn default() -> SessionLink<P>
Returns the “default value” for a type. Read more
Source§impl<P> Link<P> for SessionLink<P>where
P: Clone,
The session link satisfies the link port, and reports scope boundaries through it.
impl<P> Link<P> for SessionLink<P>where
P: Clone,
The session link satisfies the link port, and reports scope boundaries through it.
It classifies its two boundary indications as boundaries, which is a claim that it can observe them — and it can: the simulator raises a session ending and an establishment, and this link is where they enter the stack. That is what a layer above needs in order to repair a lost suffix, and what the perfect link cannot offer.
Source§impl<P: Clone> Protocol for SessionLink<P>
impl<P: Clone> Protocol for SessionLink<P>
Source§type Meta = Infallible
type Meta = Infallible
Keeps nothing durably: a crash loses everything this protocol knows.
Source§type Scope = SessionEvent
type Scope = SessionEvent
Scopes whose boundaries this protocol’s guarantees depend on, and which it can observe. Read more
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: Wire<P>, cx: &mut ProtoCx<'_, Self>)
fn on_msg(&mut self, from: NodeId, msg: Wire<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
Source§fn on_scope_event(&mut self, event: SessionEvent, cx: &mut ProtoCx<'_, Self>)
fn on_scope_event(&mut self, event: SessionEvent, cx: &mut ProtoCx<'_, Self>)
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
§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
Auto Trait Implementations§
impl<P> Freeze for SessionLink<P>
impl<P> RefUnwindSafe for SessionLink<P>where
P: RefUnwindSafe,
impl<P> Send for SessionLink<P>where
P: Send,
impl<P> Sync for SessionLink<P>where
P: Sync,
impl<P> Unpin for SessionLink<P>where
P: Unpin,
impl<P> UnsafeUnpin for SessionLink<P>
impl<P> UnwindSafe for SessionLink<P>where
P: UnwindSafe,
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