pub struct CompressedBody {
pub body: Vec<u8>,
pub content_encoding: String,
}Expand description
A compressed body with its Content-Encoding header value. The
caller writes the body bytes onto the wire verbatim and sets the
header — both are required, and a mismatched pairing is a
debugging nightmare for the operator if we let it happen.
Fields§
§body: Vec<u8>Body bytes ready to put on the wire.
content_encoding: StringContent-Encoding header value matching the body’s
outermost layer. For a chain gzip,br the header is "gzip, br" (HTTP allows comma-separated lists, processed
outer-first per RFC 9110 §8.4).
Trait Implementations§
Source§impl Clone for CompressedBody
impl Clone for CompressedBody
Source§fn clone(&self) -> CompressedBody
fn clone(&self) -> CompressedBody
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 moreSource§impl Debug for CompressedBody
impl Debug for CompressedBody
impl Eq for CompressedBody
Source§impl PartialEq for CompressedBody
impl PartialEq for CompressedBody
Source§fn eq(&self, other: &CompressedBody) -> bool
fn eq(&self, other: &CompressedBody) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompressedBody
Auto Trait Implementations§
impl Freeze for CompressedBody
impl RefUnwindSafe for CompressedBody
impl Send for CompressedBody
impl Sync for CompressedBody
impl Unpin for CompressedBody
impl UnsafeUnpin for CompressedBody
impl UnwindSafe for CompressedBody
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.