Enum nix_compat::wire::bytes::writer::BytesPacketPosition
source · enum BytesPacketPosition {
Size(usize),
Payload(u64),
Padding(usize),
}
Expand description
Models the position inside a “bytes wire packet” that the writer is in. It can be in three different stages, inside size, payload or padding fields. The number tracks the number of bytes written inside the specific field. There shall be no ambiguous states, at the end of a stage we immediately move to the beginning of the next one:
- Size(LEN_SIZE) must be expressed as Payload(0)
- Payload(self.payload_len) must be expressed as Padding(0)
Padding(padding_len) means we’re at the end of the bytes wire packet.
Variants§
Trait Implementations§
source§impl Clone for BytesPacketPosition
impl Clone for BytesPacketPosition
source§fn clone(&self) -> BytesPacketPosition
fn clone(&self) -> BytesPacketPosition
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 BytesPacketPosition
impl Debug for BytesPacketPosition
source§impl PartialEq for BytesPacketPosition
impl PartialEq for BytesPacketPosition
source§fn eq(&self, other: &BytesPacketPosition) -> bool
fn eq(&self, other: &BytesPacketPosition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for BytesPacketPosition
impl StructuralPartialEq for BytesPacketPosition
Auto Trait Implementations§
impl Freeze for BytesPacketPosition
impl RefUnwindSafe for BytesPacketPosition
impl Send for BytesPacketPosition
impl Sync for BytesPacketPosition
impl Unpin for BytesPacketPosition
impl UnwindSafe for BytesPacketPosition
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
)