Trait ratchet_ext::SplittableExtension
source · pub trait SplittableExtension: Extension {
type SplitEncoder: ExtensionEncoder + Send + Sync + 'static;
type SplitDecoder: ExtensionDecoder + Send + Sync + 'static;
// Required method
fn split(self) -> (Self::SplitEncoder, Self::SplitDecoder);
}
Expand description
A trait for permitting an extension to be split into its encoder and decoder halves. Allowing for a WebSocket to be split into its sender and receiver halves.
Required Associated Types§
sourcetype SplitEncoder: ExtensionEncoder + Send + Sync + 'static
type SplitEncoder: ExtensionEncoder + Send + Sync + 'static
The type of the encoder.
sourcetype SplitDecoder: ExtensionDecoder + Send + Sync + 'static
type SplitDecoder: ExtensionDecoder + Send + Sync + 'static
The type of the decoder.
Required Methods§
sourcefn split(self) -> (Self::SplitEncoder, Self::SplitDecoder)
fn split(self) -> (Self::SplitEncoder, Self::SplitDecoder)
Split this extension into its encoder and decoder halves.