pub enum MuxMessage {
Register {
protocol: ProtocolId<Erased>,
frame: Frame,
handler: StageRef<HandlerMessage>,
max_buffer: usize,
},
Buffer(ProtocolId<Erased>, usize),
Send(ProtocolId<Erased>, NonEmptyBytes, StageRef<Sent>),
FromNetwork(Timestamp, ProtocolId<Erased>, NonEmptyBytes),
Written,
WantNext(ProtocolId<Erased>),
Terminate,
}Variants§
Register
Register the given protocol with its ID so that data will be fed into it
Note that the handler explicitly needs to request each network message by sending WantNext.
This is necessary to allow proper handling of TCP simultaneous open in the handshake protocol.
Buffer(ProtocolId<Erased>, usize)
Buffer incoming data for this protocol ID up to the given limit (this should be followed by Register eventually, to then consume the data)
Setting the size to zero means that data are dropped without begin buffered and without tearing down the connection.
Send(ProtocolId<Erased>, NonEmptyBytes, StageRef<Sent>)
Send the given message on the protocol ID and notify when enqueued in TCP buffer
FromNetwork(Timestamp, ProtocolId<Erased>, NonEmptyBytes)
internal message coming from the TCP stream reader
Written
Notify that the segment has been written to the TCP stream
WantNext(ProtocolId<Erased>)
Permit the next invocation of the Protocol with data from the network.
Terminate
Reading or writing error occurred
Trait Implementations§
Source§impl Debug for MuxMessage
impl Debug for MuxMessage
Source§impl<'de> Deserialize<'de> for MuxMessage
impl<'de> Deserialize<'de> for MuxMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for MuxMessage
impl PartialEq for MuxMessage
Source§impl Serialize for MuxMessage
impl Serialize for MuxMessage
impl StructuralPartialEq for MuxMessage
Auto Trait Implementations§
impl !Freeze for MuxMessage
impl !RefUnwindSafe for MuxMessage
impl Send for MuxMessage
impl Sync for MuxMessage
impl Unpin for MuxMessage
impl UnsafeUnpin for MuxMessage
impl !UnwindSafe for MuxMessage
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 more