pub struct WireU16(/* private fields */);Expand description
16-bit unsigned little-endian wire integer.
Implementations§
Source§impl WireU16
impl WireU16
Sourcepub fn checked_add_assign(&mut self, rhs: u16) -> Result<(), ProgramError>
pub fn checked_add_assign(&mut self, rhs: u16) -> Result<(), ProgramError>
Checked addition in native form, written back on success.
Sourcepub fn add_assign_checked(&mut self, rhs: u16) -> Result<(), ProgramError>
pub fn add_assign_checked(&mut self, rhs: u16) -> Result<(), ProgramError>
Alias for Self::checked_add_assign.
Sourcepub fn checked_sub_assign(&mut self, rhs: u16) -> Result<(), ProgramError>
pub fn checked_sub_assign(&mut self, rhs: u16) -> Result<(), ProgramError>
Checked subtraction in native form, written back on success.
Sourcepub fn sub_assign_checked(&mut self, rhs: u16) -> Result<(), ProgramError>
pub fn sub_assign_checked(&mut self, rhs: u16) -> Result<(), ProgramError>
Alias for Self::checked_sub_assign.
Sourcepub fn checked_mul_assign(&mut self, rhs: u16) -> Result<(), ProgramError>
pub fn checked_mul_assign(&mut self, rhs: u16) -> Result<(), ProgramError>
Checked multiplication in native form, written back on success.
Sourcepub fn mul_assign_checked(&mut self, rhs: u16) -> Result<(), ProgramError>
pub fn mul_assign_checked(&mut self, rhs: u16) -> Result<(), ProgramError>
Alias for Self::checked_mul_assign.
Sourcepub fn as_bytes_mut(&mut self) -> &mut [u8; 2]
pub fn as_bytes_mut(&mut self) -> &mut [u8; 2]
Raw byte access (mutable).
Trait Implementations§
Source§impl AddAssign<u16> for WireU16
impl AddAssign<u16> for WireU16
Source§fn add_assign(&mut self, rhs: u16)
fn add_assign(&mut self, rhs: u16)
Performs the
+= operation. Read moreSource§impl AddAssign for WireU16
impl AddAssign for WireU16
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl FixedLayout for WireU16
impl FixedLayout for WireU16
Source§impl MulAssign<u16> for WireU16
impl MulAssign<u16> for WireU16
Source§fn mul_assign(&mut self, rhs: u16)
fn mul_assign(&mut self, rhs: u16)
Performs the
*= operation. Read moreSource§impl MulAssign for WireU16
impl MulAssign for WireU16
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for WireU16
impl Ord for WireU16
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for WireU16
impl PartialOrd for WireU16
Source§impl SubAssign<u16> for WireU16
impl SubAssign<u16> for WireU16
Source§fn sub_assign(&mut self, rhs: u16)
fn sub_assign(&mut self, rhs: u16)
Performs the
-= operation. Read moreSource§impl SubAssign for WireU16
impl SubAssign for WireU16
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for WireU16
impl Eq for WireU16
impl HopperZeroCopySealed for WireU16
impl Pod for WireU16
Available on crate feature
hopper-native-backend only.impl Pod for WireU16
impl StructuralPartialEq for WireU16
Auto Trait Implementations§
impl Freeze for WireU16
impl RefUnwindSafe for WireU16
impl Send for WireU16
impl Sync for WireU16
impl Unpin for WireU16
impl UnsafeUnpin for WireU16
impl UnwindSafe for WireU16
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.