Struct ratchet_rs::NegotiatedExtension [−][src]
pub struct NegotiatedExtension<E>(_);
Implementations
Trait Implementations
type Error = <E as ExtensionDecoder>::Error
type Error = <E as ExtensionDecoder>::Error
The error type produced by this extension if decoding fails.
pub fn decode(
&mut self,
payload: &mut BytesMut,
header: &mut FrameHeader
) -> Result<(), <NegotiatedExtension<E> as ExtensionDecoder>::Error>
pub fn decode(
&mut self,
payload: &mut BytesMut,
header: &mut FrameHeader
) -> Result<(), <NegotiatedExtension<E> as ExtensionDecoder>::Error>
Invoked when a frame has been received. Read more
type Error = <E as ExtensionEncoder>::Error
type Error = <E as ExtensionEncoder>::Error
The error type produced by this extension if encoding fails.
pub fn encode(
&mut self,
payload: &mut BytesMut,
header: &mut FrameHeader
) -> Result<(), <NegotiatedExtension<E> as ExtensionEncoder>::Error>
pub fn encode(
&mut self,
payload: &mut BytesMut,
header: &mut FrameHeader
) -> Result<(), <NegotiatedExtension<E> as ExtensionEncoder>::Error>
Invoked when a frame has been received. Read more
Performs the conversion.
Performs the conversion.
pub fn reunite(
encoder: <NegotiatedExtension<E> as SplittableExtension>::SplitEncoder,
decoder: <NegotiatedExtension<E> as SplittableExtension>::SplitDecoder
) -> NegotiatedExtension<E>
pub fn reunite(
encoder: <NegotiatedExtension<E> as SplittableExtension>::SplitEncoder,
decoder: <NegotiatedExtension<E> as SplittableExtension>::SplitDecoder
) -> NegotiatedExtension<E>
Reunite this encoder and decoder back into a single extension.
type SplitEncoder = NegotiatedExtension<<E as SplittableExtension>::SplitEncoder>
type SplitEncoder = NegotiatedExtension<<E as SplittableExtension>::SplitEncoder>
The type of the encoder.
type SplitDecoder = NegotiatedExtension<<E as SplittableExtension>::SplitDecoder>
type SplitDecoder = NegotiatedExtension<<E as SplittableExtension>::SplitDecoder>
The type of the decoder.
pub fn split(
self
) -> (<NegotiatedExtension<E> as SplittableExtension>::SplitEncoder, <NegotiatedExtension<E> as SplittableExtension>::SplitDecoder)
pub fn split(
self
) -> (<NegotiatedExtension<E> as SplittableExtension>::SplitEncoder, <NegotiatedExtension<E> as SplittableExtension>::SplitDecoder)
Split this extension into its encoder and decoder halves.