pub struct CommandCodec { /* private fields */ }Expand description
Codec for encoding and decoding SMPP PDUs.
Implementations§
Source§impl CommandCodec
impl CommandCodec
Sourcepub const fn new() -> Self
pub const fn new() -> Self
Creates a new CommandCodec with a default maximum length of 8192 bytes.
pub const fn max_length(&self) -> Option<usize>
pub fn with_max_length(self, max_length: usize) -> Self
pub fn without_max_length(self) -> Self
Trait Implementations§
Source§impl Debug for CommandCodec
impl Debug for CommandCodec
Source§impl Decoder for CommandCodec
Available on crate feature tokio-codec only.
impl Decoder for CommandCodec
Available on crate feature
tokio-codec only.Source§type Error = DecodeError
type Error = DecodeError
The type of unrecoverable frame decoding errors. Read more
Source§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
Source§impl Default for CommandCodec
impl Default for CommandCodec
Source§impl Encoder<&Command> for CommandCodec
Available on crate feature tokio-codec only.
impl Encoder<&Command> for CommandCodec
Available on crate feature
tokio-codec only.Source§impl Encoder<Command> for CommandCodec
Available on crate feature tokio-codec only.
impl Encoder<Command> for CommandCodec
Available on crate feature
tokio-codec only.Auto Trait Implementations§
impl Freeze for CommandCodec
impl RefUnwindSafe for CommandCodec
impl Send for CommandCodec
impl Sync for CommandCodec
impl Unpin for CommandCodec
impl UnwindSafe for CommandCodec
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