Struct zerovec::ule::RawBytesULE
source · [−]Expand description
A u8 array of little-endian data with infallible conversions to and from &u8.
Tuple Fields
0: [u8; N]
Implementations
sourceimpl RawBytesULE<2>
impl RawBytesULE<2>
sourceimpl RawBytesULE<2>
impl RawBytesULE<2>
pub fn from_byte_slice_unchecked_mut(bytes: &mut [u8]) -> &mut [Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
sourcepub fn as_unsigned_int(&self) -> u16
pub fn as_unsigned_int(&self) -> u16
Gets this RawBytesULE as an unsigned int. This is equivalent to calling AsULE::from_unaligned() on the appropriately sized type.
sourceimpl RawBytesULE<4>
impl RawBytesULE<4>
sourceimpl RawBytesULE<4>
impl RawBytesULE<4>
pub fn from_byte_slice_unchecked_mut(bytes: &mut [u8]) -> &mut [Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
sourcepub fn as_unsigned_int(&self) -> u32
pub fn as_unsigned_int(&self) -> u32
Gets this RawBytesULE as an unsigned int. This is equivalent to calling AsULE::from_unaligned() on the appropriately sized type.
sourceimpl RawBytesULE<8>
impl RawBytesULE<8>
sourceimpl RawBytesULE<8>
impl RawBytesULE<8>
pub fn from_byte_slice_unchecked_mut(bytes: &mut [u8]) -> &mut [Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
sourcepub fn as_unsigned_int(&self) -> u64
pub fn as_unsigned_int(&self) -> u64
Gets this RawBytesULE as an unsigned int. This is equivalent to calling AsULE::from_unaligned() on the appropriately sized type.
sourceimpl RawBytesULE<16>
impl RawBytesULE<16>
sourceimpl RawBytesULE<16>
impl RawBytesULE<16>
pub fn from_byte_slice_unchecked_mut(bytes: &mut [u8]) -> &mut [Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
sourcepub fn as_unsigned_int(&self) -> u128
pub fn as_unsigned_int(&self) -> u128
Gets this RawBytesULE as an unsigned int. This is equivalent to calling AsULE::from_unaligned() on the appropriately sized type.
Trait Implementations
sourceimpl<const N: usize> Clone for RawBytesULE<N>
impl<const N: usize> Clone for RawBytesULE<N>
sourcefn clone(&self) -> RawBytesULE<N>
fn clone(&self) -> RawBytesULE<N>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<const N: usize> Debug for RawBytesULE<N>
impl<const N: usize> Debug for RawBytesULE<N>
sourceimpl From<i128> for RawBytesULE<16>
impl From<i128> for RawBytesULE<16>
sourceimpl From<i16> for RawBytesULE<2>
impl From<i16> for RawBytesULE<2>
sourceimpl From<i32> for RawBytesULE<4>
impl From<i32> for RawBytesULE<4>
sourceimpl From<i64> for RawBytesULE<8>
impl From<i64> for RawBytesULE<8>
sourceimpl From<u128> for RawBytesULE<16>
impl From<u128> for RawBytesULE<16>
sourceimpl From<u16> for RawBytesULE<2>
impl From<u16> for RawBytesULE<2>
sourceimpl From<u32> for RawBytesULE<4>
impl From<u32> for RawBytesULE<4>
sourceimpl From<u64> for RawBytesULE<8>
impl From<u64> for RawBytesULE<8>
sourceimpl<const N: usize> Hash for RawBytesULE<N>
impl<const N: usize> Hash for RawBytesULE<N>
sourceimpl<const N: usize> Ord for RawBytesULE<N>
impl<const N: usize> Ord for RawBytesULE<N>
sourcefn cmp(&self, other: &RawBytesULE<N>) -> Ordering
fn cmp(&self, other: &RawBytesULE<N>) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<const N: usize> PartialEq<RawBytesULE<N>> for RawBytesULE<N>
impl<const N: usize> PartialEq<RawBytesULE<N>> for RawBytesULE<N>
sourcefn eq(&self, other: &RawBytesULE<N>) -> bool
fn eq(&self, other: &RawBytesULE<N>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RawBytesULE<N>) -> bool
fn ne(&self, other: &RawBytesULE<N>) -> bool
This method tests for !=
.
sourceimpl<const N: usize> PartialOrd<RawBytesULE<N>> for RawBytesULE<N>
impl<const N: usize> PartialOrd<RawBytesULE<N>> for RawBytesULE<N>
sourcefn partial_cmp(&self, other: &RawBytesULE<N>) -> Option<Ordering>
fn partial_cmp(&self, other: &RawBytesULE<N>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl ULE for RawBytesULE<16>
impl ULE for RawBytesULE<16>
sourcefn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
Validates a byte slice, &[u8]
. Read more
sourcefn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
Parses a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime. Read more
sourceunsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Takes a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_byte_slice()
with
success. Read more
sourceimpl ULE for RawBytesULE<2>
impl ULE for RawBytesULE<2>
sourcefn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
Validates a byte slice, &[u8]
. Read more
sourcefn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
Parses a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime. Read more
sourceunsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Takes a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_byte_slice()
with
success. Read more
sourceimpl ULE for RawBytesULE<4>
impl ULE for RawBytesULE<4>
sourcefn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
Validates a byte slice, &[u8]
. Read more
sourcefn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
Parses a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime. Read more
sourceunsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Takes a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_byte_slice()
with
success. Read more
sourceimpl ULE for RawBytesULE<8>
impl ULE for RawBytesULE<8>
sourcefn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
Validates a byte slice, &[u8]
. Read more
sourcefn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
Parses a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime. Read more
sourceunsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Takes a byte slice, &[u8]
, and return it as &[Self]
with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_byte_slice()
with
success. Read more
impl<const N: usize> Copy for RawBytesULE<N>
impl<const N: usize> Eq for RawBytesULE<N>
impl<const N: usize> StructuralEq for RawBytesULE<N>
impl<const N: usize> StructuralPartialEq for RawBytesULE<N>
Auto Trait Implementations
impl<const N: usize> RefUnwindSafe for RawBytesULE<N>
impl<const N: usize> Send for RawBytesULE<N>
impl<const N: usize> Sync for RawBytesULE<N>
impl<const N: usize> Unpin for RawBytesULE<N>
impl<const N: usize> UnwindSafe for RawBytesULE<N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more