Struct retty::codec::string_codec::TaggedStringCodec
source · pub struct TaggedStringCodec;Expand description
A tagged StringCodec handler that reads with input of TaggedBytesMut and output of TaggedString, or writes with input of TaggedString and output of TaggedBytesMut
Implementations§
Trait Implementations§
source§impl Default for TaggedStringCodec
impl Default for TaggedStringCodec
source§impl Handler for TaggedStringCodec
impl Handler for TaggedStringCodec
§type Rin = TaggedBytesMut
type Rin = TaggedBytesMut
Associated input message type for [InboundHandler::read]
§type Rout = TaggedString
type Rout = TaggedString
Associated output message type for [InboundHandler::read]
§type Win = TaggedString
type Win = TaggedString
Associated input message type for [OutboundHandler::write]
§type Wout = TaggedBytesMut
type Wout = TaggedBytesMut
Associated output message type for [OutboundHandler::write]
source§fn handle_read(
&mut self,
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>,
msg: Self::Rin
)
fn handle_read( &mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>, msg: Self::Rin )
Handles input message.
source§fn poll_write(
&mut self,
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>
) -> Option<Self::Wout>
fn poll_write( &mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout> ) -> Option<Self::Wout>
Polls output message from internal transmit queue
source§fn transport_active(
&mut self,
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>
)
fn transport_active( &mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout> )
Transport is active now, which means it is connected.
source§fn transport_inactive(
&mut self,
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>
)
fn transport_inactive( &mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout> )
Transport is inactive now, which means it is disconnected.
source§fn handle_timeout(
&mut self,
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>,
now: Instant
)
fn handle_timeout( &mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>, now: Instant )
Handles a timeout event.
source§fn poll_timeout(
&mut self,
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>,
eto: &mut Instant
)
fn poll_timeout( &mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>, eto: &mut Instant )
Polls earliest timeout (eto) in its inbound operations.
source§fn handle_read_eof(
&mut self,
ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout>
)
fn handle_read_eof( &mut self, ctx: &Context<Self::Rin, Self::Rout, Self::Win, Self::Wout> )
Reads an EOF event.
Auto Trait Implementations§
impl RefUnwindSafe for TaggedStringCodec
impl Send for TaggedStringCodec
impl Sync for TaggedStringCodec
impl Unpin for TaggedStringCodec
impl UnwindSafe for TaggedStringCodec
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