pub struct Obfs4Codec { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Decoder for EncryptingCodec
impl Decoder for EncryptingCodec
Source§type Error = FrameError
type Error = FrameError
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<T: Buf> Encoder<T> for EncryptingCodec
impl<T: Buf> Encoder<T> for EncryptingCodec
Source§fn encode(
&mut self,
plaintext: T,
dst: &mut BytesMut,
) -> Result<(), Self::Error>
fn encode( &mut self, plaintext: T, dst: &mut BytesMut, ) -> Result<(), Self::Error>
Encode encodes a single frame worth of payload and returns. Plaintext
should either be a handshake message OR a buffer containing one or more
[Message]s already properly marshalled. The proided plaintext can
be no longer than [MAX_FRAME_PAYLOAD_LENGTH].
[InvalidPayloadLength] is recoverable, all other errors MUST be
treated as fatal and the session aborted.
Source§type Error = FrameError
type Error = FrameError
The type of encoding errors. Read more
Auto Trait Implementations§
impl Freeze for EncryptingCodec
impl RefUnwindSafe for EncryptingCodec
impl Send for EncryptingCodec
impl Sync for EncryptingCodec
impl Unpin for EncryptingCodec
impl UnsafeUnpin for EncryptingCodec
impl UnwindSafe for EncryptingCodec
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more