Struct tonic::codec::EnabledCompressionEncodings
source · pub struct EnabledCompressionEncodings { /* private fields */ }
Expand description
Struct used to configure which encodings are enabled on a server or channel.
Represents an ordered list of compression encodings that are enabled.
Implementations§
source§impl EnabledCompressionEncodings
impl EnabledCompressionEncodings
sourcepub fn enable(&mut self, encoding: CompressionEncoding)
pub fn enable(&mut self, encoding: CompressionEncoding)
Enable a CompressionEncoding
.
Adds the new encoding to the end of the encoding list.
sourcepub fn pop(&mut self) -> Option<CompressionEncoding>
pub fn pop(&mut self) -> Option<CompressionEncoding>
Remove the last CompressionEncoding
.
sourcepub fn is_enabled(&self, encoding: CompressionEncoding) -> bool
pub fn is_enabled(&self, encoding: CompressionEncoding) -> bool
Check if a CompressionEncoding
is enabled.
sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Check if any CompressionEncoding
s are enabled.
Trait Implementations§
source§impl Clone for EnabledCompressionEncodings
impl Clone for EnabledCompressionEncodings
source§fn clone(&self) -> EnabledCompressionEncodings
fn clone(&self) -> EnabledCompressionEncodings
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 EnabledCompressionEncodings
impl Debug for EnabledCompressionEncodings
source§impl Default for EnabledCompressionEncodings
impl Default for EnabledCompressionEncodings
source§fn default() -> EnabledCompressionEncodings
fn default() -> EnabledCompressionEncodings
Returns the “default value” for a type. Read more
impl Copy for EnabledCompressionEncodings
Auto Trait Implementations§
impl Freeze for EnabledCompressionEncodings
impl RefUnwindSafe for EnabledCompressionEncodings
impl Send for EnabledCompressionEncodings
impl Sync for EnabledCompressionEncodings
impl Unpin for EnabledCompressionEncodings
impl UnwindSafe for EnabledCompressionEncodings
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 tonic::Request