pub enum SessionMessage {
OnMessage {
message: ProtoMessage,
direction: MessageDirection,
ack_tx: Option<Sender<Result<(), SessionError>>>,
},
MessageError {
error: SessionError,
},
TimerTimeout {
message_id: u32,
message_type: ProtoSessionMessageType,
name: Option<EncodedName>,
timeouts: u32,
},
TimerFailure {
message_id: u32,
message_type: ProtoSessionMessageType,
name: Option<EncodedName>,
timeouts: u32,
},
ParticipantDisconnected {
name: Option<ProtoName>,
},
StartDrain {
grace_period: Duration,
},
DeleteSession {
session_id: u32,
},
GetParticipantsList {
tx: Sender<Vec<ProtoName>>,
},
LeaveCleanup,
}Expand description
Message types for communication between session components
Variants§
OnMessage
application message coming from the app or from slim
MessageError
Error occurred during message processing
Fields
error: SessionErrorTimerTimeout
timeout signal for a message (ack,rtx or control messages) that needs to be send again
TimerFailure
timer failure, signal to the owner of the packet that the message will not be delivered
ParticipantDisconnected
sent by the controller sender when a disconnection is detected
StartDrain
message from session layer to the session controller to start to the close procedures of the session
DeleteSession
message from session controller to session layer to notify that the session can be removed safely
GetParticipantsList
Query the participants list from the handler
LeaveCleanup
Deferred cleanup after leave reply has been dispatched. Performs route/subscription cleanup that must happen after the LeaveReply is sent (in the return-based output model, dispatch happens after on_message returns).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SessionMessage
impl !UnwindSafe for SessionMessage
impl Freeze for SessionMessage
impl Send for SessionMessage
impl Sync for SessionMessage
impl Unpin for SessionMessage
impl UnsafeUnpin for SessionMessage
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request