Struct input_linux::EventCodec
source · 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_7 only.
impl Encoder<InputEvent> for EventCodec
Available on crate feature
tokio-util-0_7 only.