pub struct Deflate { /* private fields */ }
Expand description

The deflate extension type.

The extension does currently not support max. window bits other than the default, which is 15 and will ask for no context takeover during handshake.

Implementations§

source§

impl Deflate

source

pub fn new(mode: Mode) -> Self

Create a new deflate extension either on client or server side.

source

pub fn set_max_server_window_bits(&mut self, max: u8)

Set the server’s max. window bits.

The value must be within 9 ..= 15. The extension must be in client mode.

By including this parameter, a client limits the LZ77 sliding window size that the server will use to compress messages. A server accepts by including the “server_max_window_bits” extension parameter in the response with the same or smaller value as the offer.

source

pub fn set_max_client_window_bits(&mut self, max: u8)

Set the client’s max. window bits.

The value must be within 9 ..= 15. The extension must be in client mode.

The parameter informs the server that even if it doesn’t include the “client_max_window_bits” extension parameter in the response with a value greater than the one in the negotiation offer or if it doesn’t include the extension parameter at all, the client is not going to use an LZ77 sliding window size greater than one given here. The server may also respond with a smaller value which allows the client to reduce its sliding window even more.

Trait Implementations§

source§

impl Debug for Deflate

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Extension for Deflate

source§

fn name(&self) -> &str

The name of this extension.
source§

fn is_enabled(&self) -> bool

Is this extension enabled?
source§

fn params(&self) -> &[Param<'_>]

The parameters this extension wants to send for negotiation.
source§

fn configure(&mut self, params: &[Param<'_>]) -> Result<(), BoxedError>

Configure this extension with the parameters received from negotiation.
source§

fn reserved_bits(&self) -> (bool, bool, bool)

The reserved bits this extension uses.
source§

fn decode( &mut self, header: &mut Header, data: &mut Vec<u8> ) -> Result<(), BoxedError>

Decode a frame. Read more
source§

fn encode( &mut self, header: &mut Header, data: &mut Storage<'_> ) -> Result<(), BoxedError>

Encode a frame, given as frame header and payload data.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

source§

fn vzip(self) -> V