pub struct Codec { /* private fields */ }Expand description
Authentication codec.
Implementations§
Source§impl Codec
impl Codec
Sourcepub fn new_client() -> Self
pub fn new_client() -> Self
Creates a new authentication codec for a client. This will put the
codec in the Ack state since it will be waiting for an ack.
Sourcepub fn new_server() -> Self
pub fn new_server() -> Self
Creates a new authentication codec for a server. This will put the
codec in the AuthReceive state since it will be waiting for the
client to send its ID.
Trait Implementations§
Source§impl Decoder for Codec
impl Decoder for Codec
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
Auto Trait Implementations§
impl Freeze for Codec
impl RefUnwindSafe for Codec
impl Send for Codec
impl Sync for Codec
impl Unpin for Codec
impl UnsafeUnpin for Codec
impl UnwindSafe for Codec
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