Enum packet::serialize::TruncateDirection
source · pub enum TruncateDirection {
DiscardFront,
DiscardBack,
NoTruncating,
}
Expand description
The direction a buffer’s body should be truncated from to force it to fit within a size limit.
Variants§
DiscardFront
If a buffer cannot fit within a limit, discard bytes from the front of the body.
DiscardBack
If a buffer cannot fit within a limit, discard bytes from the end of the body.
NoTruncating
Do not attempt to truncate a buffer to make it fit within a limit.
Trait Implementations§
source§impl Clone for TruncateDirection
impl Clone for TruncateDirection
source§fn clone(&self) -> TruncateDirection
fn clone(&self) -> TruncateDirection
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 TruncateDirection
impl Debug for TruncateDirection
source§impl PartialEq for TruncateDirection
impl PartialEq for TruncateDirection
source§fn eq(&self, other: &TruncateDirection) -> bool
fn eq(&self, other: &TruncateDirection) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for TruncateDirection
impl Eq for TruncateDirection
impl StructuralPartialEq for TruncateDirection
Auto Trait Implementations§
impl Freeze for TruncateDirection
impl RefUnwindSafe for TruncateDirection
impl Send for TruncateDirection
impl Sync for TruncateDirection
impl Unpin for TruncateDirection
impl UnwindSafe for TruncateDirection
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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
)