Enum shellcoder::ops::WriteInteger
source · #[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>
source§fn eq(&self, other: &WriteInteger<I>) -> bool
fn eq(&self, other: &WriteInteger<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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
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
)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
)