#[non_exhaustive]pub enum WriteInteger<I>where
I: EncodableInteger + WithOrWithoutSerde,{
BigEndian(I),
LittleEndian(I),
}
Expand description
An operation that writes an integer. The cursor will be moved ahead by n bytes, n depending on the integer’s encoded size.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BigEndian(I)
The integer’s value, to encode in big-endian.
LittleEndian(I)
The integer’s value, to encode in little-endian.
Implementations§
Source§impl<I> WriteInteger<I>where
I: EncodableInteger,
impl<I> WriteInteger<I>where
I: EncodableInteger,
Sourcepub const fn new_be(value: I) -> Self
pub const fn new_be(value: I) -> Self
Instantiates a new WriteInteger
to write a big-endian encoded integer.
Sourcepub const fn new_le(value: I) -> Self
pub const fn new_le(value: I) -> Self
Instantiates a new WriteInteger
to write a little-endian encoded integer.
Trait Implementations§
Source§impl<I> Clone for WriteInteger<I>
impl<I> Clone for WriteInteger<I>
Source§fn clone(&self) -> WriteInteger<I>
fn clone(&self) -> WriteInteger<I>
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<I> Debug for WriteInteger<I>
impl<I> Debug for WriteInteger<I>
Source§impl<I> Op for WriteInteger<I>where
I: EncodableInteger,
impl<I> Op for WriteInteger<I>where
I: EncodableInteger,
Source§impl<I> PartialEq for WriteInteger<I>
impl<I> PartialEq for WriteInteger<I>
impl<I> Copy for WriteInteger<I>
impl<I> Eq for WriteInteger<I>
impl<I> StructuralPartialEq for WriteInteger<I>where
I: EncodableInteger + WithOrWithoutSerde,
Auto Trait Implementations§
impl<I> Freeze for WriteInteger<I>where
I: Freeze,
impl<I> RefUnwindSafe for WriteInteger<I>where
I: RefUnwindSafe,
impl<I> Send for WriteInteger<I>
impl<I> Sync for WriteInteger<I>
impl<I> Unpin for WriteInteger<I>where
I: Unpin,
impl<I> UnwindSafe for WriteInteger<I>where
I: UnwindSafe,
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