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<Name>,
timeouts: u32,
},
TimerFailure {
message_id: u32,
message_type: ProtoSessionMessageType,
name: Option<Name>,
timeouts: u32,
},
ParticipantDisconnected {
name: Option<Name>,
},
StartDrain {
grace_period: Duration,
},
DeleteSession {
session_id: u32,
},
GetParticipantsList {
tx: Sender<Vec<Name>>,
},
}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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SessionMessage
impl !RefUnwindSafe for SessionMessage
impl Send for SessionMessage
impl Sync for SessionMessage
impl Unpin for SessionMessage
impl UnsafeUnpin for SessionMessage
impl !UnwindSafe 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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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>
Wrap the input message
T in a tonic::Request