Struct valence_protocol::CompressionThreshold
source · pub struct CompressionThreshold(pub i32);
Expand description
How large a packet should be before it is compressed by the packet encoder.
If the inner value is >= 0, then packets with encoded lengths >= to this value will be compressed. If the value is negative, then compression is disabled and no packets are compressed.
Tuple Fields§
§0: i32
Implementations§
Trait Implementations§
source§impl Clone for CompressionThreshold
impl Clone for CompressionThreshold
source§fn clone(&self) -> CompressionThreshold
fn clone(&self) -> CompressionThreshold
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 CompressionThreshold
impl Debug for CompressionThreshold
source§impl Default for CompressionThreshold
impl Default for CompressionThreshold
No compression.
source§impl From<CompressionThreshold> for i32
impl From<CompressionThreshold> for i32
source§fn from(value: CompressionThreshold) -> Self
fn from(value: CompressionThreshold) -> Self
Converts to this type from the input type.
source§impl From<i32> for CompressionThreshold
impl From<i32> for CompressionThreshold
source§impl Hash for CompressionThreshold
impl Hash for CompressionThreshold
source§impl Ord for CompressionThreshold
impl Ord for CompressionThreshold
source§fn cmp(&self, other: &CompressionThreshold) -> Ordering
fn cmp(&self, other: &CompressionThreshold) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CompressionThreshold
impl PartialEq for CompressionThreshold
source§impl PartialOrd for CompressionThreshold
impl PartialOrd for CompressionThreshold
impl Copy for CompressionThreshold
impl Eq for CompressionThreshold
impl StructuralPartialEq for CompressionThreshold
Auto Trait Implementations§
impl Freeze for CompressionThreshold
impl RefUnwindSafe for CompressionThreshold
impl Send for CompressionThreshold
impl Sync for CompressionThreshold
impl Unpin for CompressionThreshold
impl UnwindSafe for CompressionThreshold
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World
].