pub struct EventCodec { /* private fields */ }
Available on crate feature
codec
only.Implementations§
Source§impl EventCodec
impl EventCodec
pub const fn new() -> Self
pub fn decode_bytes( &mut self, src: &mut BytesMut, ) -> Result<Option<InputEvent>, Error>
Available on crate feature
bytes
only.pub fn encode_bytes( &mut self, item: InputEvent, dst: &mut BytesMut, ) -> Result<(), Error>
Available on crate feature
bytes
only.Trait Implementations§
§impl Decoder for EventCodec
Available on crate feature tokio-util-0_6
only.
impl Decoder for EventCodec
Available on crate feature
tokio-util-0_6
only.§type Item = InputEvent
type Item = InputEvent
The type of decoded frames.
§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
§impl Decoder for EventCodec
Available on crate feature tokio-util-0_7
only.
impl Decoder for EventCodec
Available on crate feature
tokio-util-0_7
only.§type Item = InputEvent
type Item = InputEvent
The type of decoded frames.
§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
§impl Encoder<InputEvent> for EventCodec
Available on crate feature tokio-util-0_6
only.
impl Encoder<InputEvent> for EventCodec
Available on crate feature
tokio-util-0_6
only.Auto Trait Implementations§
impl Freeze for EventCodec
impl RefUnwindSafe for EventCodec
impl Send for EventCodec
impl Sync for EventCodec
impl Unpin for EventCodec
impl UnwindSafe for EventCodec
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