Struct ratchet_deflate::DeflateExtProvider
source · pub struct DeflateExtProvider { /* private fields */ }
Expand description
An ExtensionProvider for negotiating permessage-deflate during a WebSocket handshake.
Implementations§
source§impl DeflateExtProvider
impl DeflateExtProvider
sourcepub fn with_config(config: DeflateConfig) -> DeflateExtProvider
pub fn with_config(config: DeflateConfig) -> DeflateExtProvider
Initialise a DeflateExtProvider
with config
.
sourcepub fn config(&self) -> &DeflateConfig
pub fn config(&self) -> &DeflateConfig
Provides a reference to the configuration that this provider has been initialised with.
Trait Implementations§
source§impl Clone for DeflateExtProvider
impl Clone for DeflateExtProvider
source§fn clone(&self) -> DeflateExtProvider
fn clone(&self) -> DeflateExtProvider
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DeflateExtProvider
impl Debug for DeflateExtProvider
source§impl Default for DeflateExtProvider
impl Default for DeflateExtProvider
source§fn default() -> DeflateExtProvider
fn default() -> DeflateExtProvider
Returns the “default value” for a type. Read more
source§impl ExtensionProvider for DeflateExtProvider
impl ExtensionProvider for DeflateExtProvider
§type Error = DeflateExtensionError
type Error = DeflateExtensionError
The error produced by this extension if the handshake failed.
source§fn apply_headers(&self, headers: &mut HeaderMap)
fn apply_headers(&self, headers: &mut HeaderMap)
Apply this extension’s headers to a request.
source§fn negotiate_client(
&self,
headers: &[Header<'_>]
) -> Result<Option<Self::Extension>, Self::Error>
fn negotiate_client( &self, headers: &[Header<'_>] ) -> Result<Option<Self::Extension>, Self::Error>
Negotiate the headers that the server responded with. Read more
source§fn negotiate_server(
&self,
headers: &[Header<'_>]
) -> Result<Option<(Self::Extension, HeaderValue)>, Self::Error>
fn negotiate_server( &self, headers: &[Header<'_>] ) -> Result<Option<(Self::Extension, HeaderValue)>, Self::Error>
Negotiate the headers that a client has sent. Read more
impl Copy for DeflateExtProvider
Auto Trait Implementations§
impl RefUnwindSafe for DeflateExtProvider
impl Send for DeflateExtProvider
impl Sync for DeflateExtProvider
impl Unpin for DeflateExtProvider
impl UnwindSafe for DeflateExtProvider
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