pub struct Brotli { /* private fields */ }Expand description
Brotli response compression. br typically yields a smaller body than gzip
for text/JSON.
use sark_core::http::compress::Brotli;
let body: &[u8] = b"hello";
let zipped = Brotli::with_thread_local(|br| br.encode(body).to_vec());Implementations§
Auto Trait Implementations§
impl Freeze for Brotli
impl RefUnwindSafe for Brotli
impl Send for Brotli
impl Sync for Brotli
impl Unpin for Brotli
impl UnsafeUnpin for Brotli
impl UnwindSafe for Brotli
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