Enum volo_grpc::codec::compression::CompressionEncoding
source · pub enum CompressionEncoding {
Identity,
Gzip(Option<GzipConfig>),
Zlib(Option<ZlibConfig>),
}Expand description
The compression encodings volo supports.
Variants§
Implementations§
source§impl CompressionEncoding
impl CompressionEncoding
sourcepub fn into_header_value(self) -> HeaderValue
pub fn into_header_value(self) -> HeaderValue
make the compression encoding into a HeaderValue
sourcepub fn into_accept_encoding_header_value(
self,
encodings: &[CompressionEncoding]
) -> Option<HeaderValue>
pub fn into_accept_encoding_header_value( self, encodings: &[CompressionEncoding] ) -> Option<HeaderValue>
make the compression encodings into a HeaderValue,and the encodings uses a , as
separator
sourcepub fn from_accept_encoding_header(
headers: &HeaderMap,
config: &Option<Vec<Self>>
) -> Option<Self>
pub fn from_accept_encoding_header( headers: &HeaderMap, config: &Option<Vec<Self>> ) -> Option<Self>
Based on the grpc-accept-encoding header, adaptive picking an encoding to use.
Trait Implementations§
source§impl Clone for CompressionEncoding
impl Clone for CompressionEncoding
source§fn clone(&self) -> CompressionEncoding
fn clone(&self) -> CompressionEncoding
Returns a copy of the value. Read more
1.0.0 · 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 CompressionEncoding
impl Debug for CompressionEncoding
source§impl PartialEq for CompressionEncoding
impl PartialEq for CompressionEncoding
impl Copy for CompressionEncoding
Auto Trait Implementations§
impl Freeze for CompressionEncoding
impl RefUnwindSafe for CompressionEncoding
impl Send for CompressionEncoding
impl Sync for CompressionEncoding
impl Unpin for CompressionEncoding
impl UnwindSafe for CompressionEncoding
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a volo_grpc::Request