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§

source

type SplitEncoder: ExtensionEncoder + Send + Sync + 'static

The type of the encoder.

source

type SplitDecoder: ExtensionDecoder + Send + Sync + 'static

The type of the decoder.

Required Methods§

source

fn split(self) -> (Self::SplitEncoder, Self::SplitDecoder)

Split this extension into its encoder and decoder halves.

Implementors§