pub struct CompressionNegotiator { /* private fields */ }Expand description
扩展协商器
Implementations§
Source§impl CompressionNegotiator
impl CompressionNegotiator
Sourcepub fn new(config: CompressionConfig) -> Self
pub fn new(config: CompressionConfig) -> Self
创建协商器
Sourcepub fn config(&self) -> &CompressionConfig
pub fn config(&self) -> &CompressionConfig
获取配置
Sourcepub fn negotiate(&self, client_header: &str) -> NegotiationResult
pub fn negotiate(&self, client_header: &str) -> NegotiationResult
根据客户端请求协商压缩参数
Trait Implementations§
Source§impl Clone for CompressionNegotiator
impl Clone for CompressionNegotiator
Source§fn clone(&self) -> CompressionNegotiator
fn clone(&self) -> CompressionNegotiator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CompressionNegotiator
impl RefUnwindSafe for CompressionNegotiator
impl Send for CompressionNegotiator
impl Sync for CompressionNegotiator
impl Unpin for CompressionNegotiator
impl UnsafeUnpin for CompressionNegotiator
impl UnwindSafe for CompressionNegotiator
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