Struct soketto::extension::deflate::Deflate [−][src]
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
impl Deflate
[src]
pub fn new(mode: Mode) -> Self
[src]
Create a new deflate extension either on client or server side.
pub fn set_max_server_window_bits(&mut self, max: u8)
[src]
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.
pub fn set_max_client_window_bits(&mut self, max: u8)
[src]
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
impl Debug for Deflate
[src]
impl Extension for Deflate
[src]
fn name(&self) -> &str
[src]
fn is_enabled(&self) -> bool
[src]
fn params(&self) -> &[Param<'_>]
[src]
fn configure(&mut self, params: &[Param<'_>]) -> Result<(), BoxedError>
[src]
fn reserved_bits(&self) -> (bool, bool, bool)
[src]
fn decode(
&mut self,
header: &mut Header,
data: &mut Vec<u8>
) -> Result<(), BoxedError>
[src]
&mut self,
header: &mut Header,
data: &mut Vec<u8>
) -> Result<(), BoxedError>
fn encode(
&mut self,
header: &mut Header,
data: &mut Storage<'_>
) -> Result<(), BoxedError>
[src]
&mut self,
header: &mut Header,
data: &mut Storage<'_>
) -> Result<(), BoxedError>
Auto Trait Implementations
impl RefUnwindSafe for Deflate
impl Send for Deflate
impl Sync for Deflate
impl Unpin for Deflate
impl UnwindSafe for Deflate
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,