Struct NonMaxU16Le

Source
#[repr(C)]
pub struct NonMaxU16Le(/* private fields */);
Expand description

NonMaxU16Le is a nonmax, little-endian version of u16.

This type behaves mostly like a u16 however u16::MAX is not a valid value. Also this is stored as a little-endian integer. This means that on systems with a different endianness there might be a small overhead in accessing this value

Implementations§

Source§

impl NonMaxU16Le

Source

pub const MIN: Self

The smallest value that can be respresented by this integer type

Source

pub const MAX: Self

The largest value that can be respresented by this integer type

Source

pub const BITS: u32 = 15u32

The size of this integer type in bits

Source

pub const BITS_UNDERLYING: u32 = 16u32

The size of the underlying interger type in bits This is the same as BITS on the result type of Self::get (u16)

Source

pub const INVALID_UNDERLYING: u16 = 65_535u16

The value of the underlying integer that can not be represented

Source

pub const MAX_UNDERLYING: u16 = 65_534u16

The maximum value that can be safely converted into Self

Source

pub const fn new(value: u16) -> Option<Self>

Create a new Self or None if value is the max of the underlying integer type

Source

pub const unsafe fn new_unchecked(value: u16) -> Self

Create a new Self without checking if the value is the max of the underlying integer type

§Safety

value must not be u16::MAX

Source

pub const fn get(self) -> u16

Return the underlying integer type

The result is a native-endian integer

Source

pub const fn abs_diff(self, other: Self) -> Self

Computes the absolute difference between self and other.

Source

pub const fn div_ceil(self, other: Self) -> Self

Calculates the quotient of self and rhs, rounding the result towards positive infinity.

Source

pub const fn is_multiple_of(self, rhs: Self) -> bool

Returns true if self is an integer multiple of rhs, and false otherwise.

This function is equivalent to self % rhs == 0, except that it will not panic for rhs == 0. Instead, 0.is_multiple_of(0) == true, and for any non-zero n, n.is_multiple_of(0) == false.

Source

pub const fn is_power_of_two(self) -> bool

Returns true if and only if self == 2^k for some unsigned integer k.

Source

pub const fn checked_next_power_of_two(self) -> Option<Self>

Returns the smallest power of two greater than or equal to self. If the next power of two is greater than the type’s maximum value, None is returned, otherwise the power of two is wrapped in Some.

Source

pub const fn checked_next_multiple_of(self, other: Self) -> Option<Self>

Calculates the smallest value greater than or equal to self that is a multiple of rhs. Returns None if rhs is zero or the operation would result in overflow.

Source

pub const fn midpoint(self, other: Self) -> Self

Calculates the midpoint (average) between self and rhs.

midpoint(a, b) is (a + b) / 2 as if it were performed in a sufficiently-large unsigned integral type. This implies that the result is always rounded towards zero and that no overflow will ever occur.

Source

pub const fn ilog(self, base: Self) -> u32

Returns the logarithm of the number with respect to an arbitrary base, rounded down.

This method might not be optimized owing to implementation details; ilog2 can produce results more efficiently for base 2, and ilog10 can produce results more efficiently for base 10.

§Panics

This function will panic if self is zero, or if base is less than 2.

Source

pub const fn ilog2(self) -> u32

Returns the base 2 logarithm of the number, rounded down.

§Panics

This function will panic if self is zero.

Source

pub const fn ilog10(self) -> u32

Returns the base 10 logarithm of the number, rounded down.

§Panics

This function will panic if self is zero.

Source

pub const fn isqrt(self) -> Self

Returns the square root of the number, rounded down.

Source

pub const fn checked_add(self, rhs: NonMaxU16Le) -> Option<NonMaxU16Le>

Checked integer addition. Computes self + rhs, returning None if overflow occured.

Source

pub const fn checked_sub(self, rhs: NonMaxU16Le) -> Option<NonMaxU16Le>

Checked integer subtraction. Computes self - rhs, returning None if overflow occured.

Source

pub const fn checked_mul(self, rhs: NonMaxU16Le) -> Option<NonMaxU16Le>

Checked integer multiplication. Computes self * rhs, returning None if overflow occured.

Source

pub const fn checked_div(self, rhs: NonMaxU16Le) -> Option<NonMaxU16Le>

Checked integer division. Computes self / rhs, returning None if rhs == 0.

Source

pub const fn checked_div_euclid(self, rhs: NonMaxU16Le) -> Option<NonMaxU16Le>

Checked Euclidean division. Computes self.div_euclid(rhs), returning None if rhs == 0.

Strict division on unsigned types is just normal division. There’s no way overflow could ever happen. This function exists so that all operations are accounted for in the strict operations. Since, for the positive integers, all common definitions of division are equal, this is exactly equal to self.strict_div(rhs).

Source

pub const fn checked_rem(self, rhs: NonMaxU16Le) -> Option<NonMaxU16Le>

Checked integer division. Computes self % rhs, returning None if rhs == 0.

Source

pub const fn checked_shl(self, rhs: u32) -> Option<NonMaxU16Le>

Checked integer division. Computes self << rhs, returning None if rhs is larger than or equal to the number of bits in self.

Source

pub const fn checked_shr(self, rhs: u32) -> Option<NonMaxU16Le>

Checked integer division. Computes self >> rhs, returning None if rhs is larger than or equal to the number of bits in self.

Source

pub const fn checked_ilog(self, base: NonMaxU16Le) -> Option<u32>

Returns the logarithm of the number with respect to an arbitrary base, rounded down.

Returns None if the number is zero, or if the base is not at least 2.

This method might not be optimized owing to implementation details; checked_ilog2 can produce results more efficiently for base 2, and checked_ilog10 can produce results more efficiently for base 10.

Source

pub const fn checked_ilog2(self) -> Option<u32>

Returns the base 2 logarithm of the number, rounded down.

Returns None if the number is zero.

Source

pub const fn checked_ilog10(self) -> Option<u32>

Returns the base 10 logarithm of the number, rounded down.

Returns None if the number is zero.

Source§

impl NonMaxU16Le

Source

pub fn to_le(self) -> NonMaxU16Le

Converts Self to little-endian

This is a no-op added for parity

Source

pub fn from_le(value: NonMaxU16Le) -> NonMaxU16Le

Creates a Self from a little-endian integer

This is a no-op added for parity

Source

pub fn to_be(self) -> NonMaxU16Be

Converts Self to big-endian

Source

pub fn from_be(value: NonMaxU16Be) -> NonMaxU16Le

Creates a Self from a big-endian integer

Source

pub fn to_native(self) -> NonMaxU16Le

Converts Self to little-endian

This is a no-op on a little-endian system

Trait Implementations§

Source§

impl Add<&NonMaxU16Le> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &NonMaxU16Le) -> <NonMaxU16Le as Add<NonMaxU16Le>>::Output

Performs the + operation. Read more
Source§

impl Add<&NonMaxU16Le> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &NonMaxU16Le) -> <NonMaxU16Le as Add<NonMaxU16Le>>::Output

Performs the + operation. Read more
Source§

impl Add<&u16> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Add<u16>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &u16) -> <NonMaxU16Le as Add<u16>>::Output

Performs the + operation. Read more
Source§

impl Add<&u16> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Add<u16>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &u16) -> <NonMaxU16Le as Add<u16>>::Output

Performs the + operation. Read more
Source§

impl<'a> Add<NonMaxU16Le> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: NonMaxU16Le) -> <NonMaxU16Le as Add<NonMaxU16Le>>::Output

Performs the + operation. Read more
Source§

impl<'a> Add<u16> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Add<u16>>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: u16) -> <NonMaxU16Le as Add<u16>>::Output

Performs the + operation. Read more
Source§

impl Add<u16> for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the + operator.
Source§

fn add(self, other: u16) -> NonMaxU16Le

Performs the + operation. Read more
Source§

impl Add for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the + operator.
Source§

fn add(self, other: NonMaxU16Le) -> NonMaxU16Le

Performs the + operation. Read more
Source§

impl AddAssign<&NonMaxU16Le> for NonMaxU16Le

Source§

fn add_assign(&mut self, other: &NonMaxU16Le)

Performs the += operation. Read more
Source§

impl AddAssign<&u16> for NonMaxU16Le

Source§

fn add_assign(&mut self, other: &u16)

Performs the += operation. Read more
Source§

impl AddAssign<u16> for NonMaxU16Le

Source§

fn add_assign(&mut self, other: u16)

Performs the += operation. Read more
Source§

impl AddAssign for NonMaxU16Le

Source§

fn add_assign(&mut self, other: NonMaxU16Le)

Performs the += operation. Read more
Source§

impl Binary for NonMaxU16Le

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl BitAnd<&NonMaxU16Le> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitAnd>::Output

The resulting type after applying the & operator.
Source§

fn bitand( self, other: &NonMaxU16Le, ) -> <NonMaxU16Le as BitAnd<NonMaxU16Le>>::Output

Performs the & operation. Read more
Source§

impl BitAnd<&NonMaxU16Le> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitAnd>::Output

The resulting type after applying the & operator.
Source§

fn bitand( self, other: &NonMaxU16Le, ) -> <NonMaxU16Le as BitAnd<NonMaxU16Le>>::Output

Performs the & operation. Read more
Source§

impl BitAnd<&u16> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitAnd<u16>>::Output

The resulting type after applying the & operator.
Source§

fn bitand(self, other: &u16) -> <NonMaxU16Le as BitAnd<u16>>::Output

Performs the & operation. Read more
Source§

impl BitAnd<&u16> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitAnd<u16>>::Output

The resulting type after applying the & operator.
Source§

fn bitand(self, other: &u16) -> <NonMaxU16Le as BitAnd<u16>>::Output

Performs the & operation. Read more
Source§

impl<'a> BitAnd<NonMaxU16Le> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitAnd>::Output

The resulting type after applying the & operator.
Source§

fn bitand( self, other: NonMaxU16Le, ) -> <NonMaxU16Le as BitAnd<NonMaxU16Le>>::Output

Performs the & operation. Read more
Source§

impl<'a> BitAnd<u16> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitAnd<u16>>::Output

The resulting type after applying the & operator.
Source§

fn bitand(self, other: u16) -> <NonMaxU16Le as BitAnd<u16>>::Output

Performs the & operation. Read more
Source§

impl BitAnd<u16> for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the & operator.
Source§

fn bitand(self, other: u16) -> NonMaxU16Le

Performs the & operation. Read more
Source§

impl BitAnd for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the & operator.
Source§

fn bitand(self, other: NonMaxU16Le) -> NonMaxU16Le

Performs the & operation. Read more
Source§

impl BitAndAssign<&NonMaxU16Le> for NonMaxU16Le

Source§

fn bitand_assign(&mut self, other: &NonMaxU16Le)

Performs the &= operation. Read more
Source§

impl BitAndAssign<&u16> for NonMaxU16Le

Source§

fn bitand_assign(&mut self, other: &u16)

Performs the &= operation. Read more
Source§

impl BitAndAssign<u16> for NonMaxU16Le

Source§

fn bitand_assign(&mut self, other: u16)

Performs the &= operation. Read more
Source§

impl BitAndAssign for NonMaxU16Le

Source§

fn bitand_assign(&mut self, other: NonMaxU16Le)

Performs the &= operation. Read more
Source§

impl BitOr<&NonMaxU16Le> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitOr>::Output

The resulting type after applying the | operator.
Source§

fn bitor( self, other: &NonMaxU16Le, ) -> <NonMaxU16Le as BitOr<NonMaxU16Le>>::Output

Performs the | operation. Read more
Source§

impl BitOr<&NonMaxU16Le> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitOr>::Output

The resulting type after applying the | operator.
Source§

fn bitor( self, other: &NonMaxU16Le, ) -> <NonMaxU16Le as BitOr<NonMaxU16Le>>::Output

Performs the | operation. Read more
Source§

impl BitOr<&u16> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitOr<u16>>::Output

The resulting type after applying the | operator.
Source§

fn bitor(self, other: &u16) -> <NonMaxU16Le as BitOr<u16>>::Output

Performs the | operation. Read more
Source§

impl BitOr<&u16> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitOr<u16>>::Output

The resulting type after applying the | operator.
Source§

fn bitor(self, other: &u16) -> <NonMaxU16Le as BitOr<u16>>::Output

Performs the | operation. Read more
Source§

impl<'a> BitOr<NonMaxU16Le> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitOr>::Output

The resulting type after applying the | operator.
Source§

fn bitor( self, other: NonMaxU16Le, ) -> <NonMaxU16Le as BitOr<NonMaxU16Le>>::Output

Performs the | operation. Read more
Source§

impl<'a> BitOr<u16> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitOr<u16>>::Output

The resulting type after applying the | operator.
Source§

fn bitor(self, other: u16) -> <NonMaxU16Le as BitOr<u16>>::Output

Performs the | operation. Read more
Source§

impl BitOr<u16> for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the | operator.
Source§

fn bitor(self, other: u16) -> NonMaxU16Le

Performs the | operation. Read more
Source§

impl BitOr for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the | operator.
Source§

fn bitor(self, other: NonMaxU16Le) -> NonMaxU16Le

Performs the | operation. Read more
Source§

impl BitOrAssign<&NonMaxU16Le> for NonMaxU16Le

Source§

fn bitor_assign(&mut self, other: &NonMaxU16Le)

Performs the |= operation. Read more
Source§

impl BitOrAssign<&u16> for NonMaxU16Le

Source§

fn bitor_assign(&mut self, other: &u16)

Performs the |= operation. Read more
Source§

impl BitOrAssign<u16> for NonMaxU16Le

Source§

fn bitor_assign(&mut self, other: u16)

Performs the |= operation. Read more
Source§

impl BitOrAssign for NonMaxU16Le

Source§

fn bitor_assign(&mut self, other: NonMaxU16Le)

Performs the |= operation. Read more
Source§

impl BitXor<&NonMaxU16Le> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitXor>::Output

The resulting type after applying the ^ operator.
Source§

fn bitxor( self, other: &NonMaxU16Le, ) -> <NonMaxU16Le as BitXor<NonMaxU16Le>>::Output

Performs the ^ operation. Read more
Source§

impl BitXor<&NonMaxU16Le> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitXor>::Output

The resulting type after applying the ^ operator.
Source§

fn bitxor( self, other: &NonMaxU16Le, ) -> <NonMaxU16Le as BitXor<NonMaxU16Le>>::Output

Performs the ^ operation. Read more
Source§

impl BitXor<&u16> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitXor<u16>>::Output

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, other: &u16) -> <NonMaxU16Le as BitXor<u16>>::Output

Performs the ^ operation. Read more
Source§

impl BitXor<&u16> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitXor<u16>>::Output

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, other: &u16) -> <NonMaxU16Le as BitXor<u16>>::Output

Performs the ^ operation. Read more
Source§

impl<'a> BitXor<NonMaxU16Le> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitXor>::Output

The resulting type after applying the ^ operator.
Source§

fn bitxor( self, other: NonMaxU16Le, ) -> <NonMaxU16Le as BitXor<NonMaxU16Le>>::Output

Performs the ^ operation. Read more
Source§

impl<'a> BitXor<u16> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as BitXor<u16>>::Output

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, other: u16) -> <NonMaxU16Le as BitXor<u16>>::Output

Performs the ^ operation. Read more
Source§

impl BitXor<u16> for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, other: u16) -> NonMaxU16Le

Performs the ^ operation. Read more
Source§

impl BitXor for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, other: NonMaxU16Le) -> NonMaxU16Le

Performs the ^ operation. Read more
Source§

impl BitXorAssign<&NonMaxU16Le> for NonMaxU16Le

Source§

fn bitxor_assign(&mut self, other: &NonMaxU16Le)

Performs the ^= operation. Read more
Source§

impl BitXorAssign<&u16> for NonMaxU16Le

Source§

fn bitxor_assign(&mut self, other: &u16)

Performs the ^= operation. Read more
Source§

impl BitXorAssign<u16> for NonMaxU16Le

Source§

fn bitxor_assign(&mut self, other: u16)

Performs the ^= operation. Read more
Source§

impl BitXorAssign for NonMaxU16Le

Source§

fn bitxor_assign(&mut self, other: NonMaxU16Le)

Performs the ^= operation. Read more
Source§

impl Clone for NonMaxU16Le

Source§

fn clone(&self) -> NonMaxU16Le

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NonMaxU16Le

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for NonMaxU16Le

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Div<&NonMaxU16Le> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &NonMaxU16Le) -> <NonMaxU16Le as Div<NonMaxU16Le>>::Output

Performs the / operation. Read more
Source§

impl Div<&NonMaxU16Le> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &NonMaxU16Le) -> <NonMaxU16Le as Div<NonMaxU16Le>>::Output

Performs the / operation. Read more
Source§

impl Div<&u16> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Div<u16>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &u16) -> <NonMaxU16Le as Div<u16>>::Output

Performs the / operation. Read more
Source§

impl Div<&u16> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Div<u16>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &u16) -> <NonMaxU16Le as Div<u16>>::Output

Performs the / operation. Read more
Source§

impl<'a> Div<NonMaxU16Le> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: NonMaxU16Le) -> <NonMaxU16Le as Div<NonMaxU16Le>>::Output

Performs the / operation. Read more
Source§

impl<'a> Div<u16> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Div<u16>>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: u16) -> <NonMaxU16Le as Div<u16>>::Output

Performs the / operation. Read more
Source§

impl Div<u16> for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the / operator.
Source§

fn div(self, other: u16) -> NonMaxU16Le

Performs the / operation. Read more
Source§

impl Div for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the / operator.
Source§

fn div(self, other: NonMaxU16Le) -> NonMaxU16Le

Performs the / operation. Read more
Source§

impl DivAssign<&NonMaxU16Le> for NonMaxU16Le

Source§

fn div_assign(&mut self, other: &NonMaxU16Le)

Performs the /= operation. Read more
Source§

impl DivAssign<&u16> for NonMaxU16Le

Source§

fn div_assign(&mut self, other: &u16)

Performs the /= operation. Read more
Source§

impl DivAssign<u16> for NonMaxU16Le

Source§

fn div_assign(&mut self, other: u16)

Performs the /= operation. Read more
Source§

impl DivAssign for NonMaxU16Le

Source§

fn div_assign(&mut self, other: NonMaxU16Le)

Performs the /= operation. Read more
Source§

impl Into<u16> for NonMaxU16Le

Source§

fn into(self) -> u16

Converts this type into the (usually inferred) input type.
Source§

impl LowerHex for NonMaxU16Le

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Mul<&NonMaxU16Le> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &NonMaxU16Le) -> <NonMaxU16Le as Mul<NonMaxU16Le>>::Output

Performs the * operation. Read more
Source§

impl Mul<&NonMaxU16Le> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &NonMaxU16Le) -> <NonMaxU16Le as Mul<NonMaxU16Le>>::Output

Performs the * operation. Read more
Source§

impl Mul<&u16> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Mul<u16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u16) -> <NonMaxU16Le as Mul<u16>>::Output

Performs the * operation. Read more
Source§

impl Mul<&u16> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Mul<u16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &u16) -> <NonMaxU16Le as Mul<u16>>::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<NonMaxU16Le> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: NonMaxU16Le) -> <NonMaxU16Le as Mul<NonMaxU16Le>>::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<u16> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Mul<u16>>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> <NonMaxU16Le as Mul<u16>>::Output

Performs the * operation. Read more
Source§

impl Mul<u16> for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> NonMaxU16Le

Performs the * operation. Read more
Source§

impl Mul for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the * operator.
Source§

fn mul(self, other: NonMaxU16Le) -> NonMaxU16Le

Performs the * operation. Read more
Source§

impl MulAssign<&NonMaxU16Le> for NonMaxU16Le

Source§

fn mul_assign(&mut self, other: &NonMaxU16Le)

Performs the *= operation. Read more
Source§

impl MulAssign<&u16> for NonMaxU16Le

Source§

fn mul_assign(&mut self, other: &u16)

Performs the *= operation. Read more
Source§

impl MulAssign<u16> for NonMaxU16Le

Source§

fn mul_assign(&mut self, other: u16)

Performs the *= operation. Read more
Source§

impl MulAssign for NonMaxU16Le

Source§

fn mul_assign(&mut self, other: NonMaxU16Le)

Performs the *= operation. Read more
Source§

impl Octal for NonMaxU16Le

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Ord for NonMaxU16Le

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for NonMaxU16Le

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for NonMaxU16Le

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Sub<&NonMaxU16Le> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &NonMaxU16Le) -> <NonMaxU16Le as Sub<NonMaxU16Le>>::Output

Performs the - operation. Read more
Source§

impl Sub<&NonMaxU16Le> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &NonMaxU16Le) -> <NonMaxU16Le as Sub<NonMaxU16Le>>::Output

Performs the - operation. Read more
Source§

impl Sub<&u16> for &NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Sub<u16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u16) -> <NonMaxU16Le as Sub<u16>>::Output

Performs the - operation. Read more
Source§

impl Sub<&u16> for NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Sub<u16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &u16) -> <NonMaxU16Le as Sub<u16>>::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<NonMaxU16Le> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: NonMaxU16Le) -> <NonMaxU16Le as Sub<NonMaxU16Le>>::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<u16> for &'a NonMaxU16Le

Source§

type Output = <NonMaxU16Le as Sub<u16>>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: u16) -> <NonMaxU16Le as Sub<u16>>::Output

Performs the - operation. Read more
Source§

impl Sub<u16> for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the - operator.
Source§

fn sub(self, other: u16) -> NonMaxU16Le

Performs the - operation. Read more
Source§

impl Sub for NonMaxU16Le

Source§

type Output = NonMaxU16Le

The resulting type after applying the - operator.
Source§

fn sub(self, other: NonMaxU16Le) -> NonMaxU16Le

Performs the - operation. Read more
Source§

impl SubAssign<&NonMaxU16Le> for NonMaxU16Le

Source§

fn sub_assign(&mut self, other: &NonMaxU16Le)

Performs the -= operation. Read more
Source§

impl SubAssign<&u16> for NonMaxU16Le

Source§

fn sub_assign(&mut self, other: &u16)

Performs the -= operation. Read more
Source§

impl SubAssign<u16> for NonMaxU16Le

Source§

fn sub_assign(&mut self, other: u16)

Performs the -= operation. Read more
Source§

impl SubAssign for NonMaxU16Le

Source§

fn sub_assign(&mut self, other: NonMaxU16Le)

Performs the -= operation. Read more
Source§

impl TryFrom<u16> for NonMaxU16Le

Source§

type Error = PrimitiveIsMaxError<u16>

The type returned in the event of a conversion error.
Source§

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl UpperHex for NonMaxU16Le

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for NonMaxU16Le

Source§

impl Eq for NonMaxU16Le

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.