sign_bound

Struct PositiveI16

Source
#[repr(C, align(2))]
pub struct PositiveI16 { /* private fields */ }

Implementations§

Source§

impl PositiveI16

Source

pub const BITS: u32 = 16u32

Source

pub const MIN: Self = _

Source

pub const MAX: Self = _

Source

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

Source

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

Source

pub const fn get(self) -> i16

Source

pub const fn count_zeros(self) -> u32

Source

pub const fn count_ones(self) -> u32

Source

pub const fn leading_zeros(self) -> u32

Source

pub const fn trailing_zeros(self) -> u32

Source

pub const fn is_power_of_two(self) -> bool

Source

pub const fn ilog2(self) -> u32

Source

pub const fn ilog10(self) -> u32

Source

pub const fn checked_neg(self) -> Option<NegativeI16>

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Trait Implementations§

Source§

impl Binary for PositiveI16

Source§

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

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

impl BitAnd<NegativeI16> for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: NegativeI16) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<PositiveI16> for NegativeI16

Source§

type Output = PositiveI16

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: PositiveI16) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<PositiveI16> for i16

Source§

type Output = PositiveI16

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: PositiveI16) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd<i16> for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: i16) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAnd for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign<NegativeI16> for PositiveI16

Source§

fn bitand_assign(&mut self, rhs: NegativeI16)

Performs the &= operation. Read more
Source§

impl BitAndAssign<i16> for PositiveI16

Source§

fn bitand_assign(&mut self, rhs: i16)

Performs the &= operation. Read more
Source§

impl BitAndAssign for PositiveI16

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr<NegativeI16> for PositiveI16

Source§

type Output = NegativeI16

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: NegativeI16) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr<PositiveI16> for NegativeI16

Source§

type Output = NegativeI16

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: PositiveI16) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOr for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign<PositiveI16> for NegativeI16

Source§

fn bitor_assign(&mut self, rhs: PositiveI16)

Performs the |= operation. Read more
Source§

impl BitOrAssign for PositiveI16

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor<NegativeI16> for PositiveI16

Source§

type Output = NegativeI16

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: NegativeI16) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor<PositiveI16> for NegativeI16

Source§

type Output = NegativeI16

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: PositiveI16) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXor for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign<PositiveI16> for NegativeI16

Source§

fn bitxor_assign(&mut self, rhs: PositiveI16)

Performs the ^= operation. Read more
Source§

impl BitXorAssign for PositiveI16

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for PositiveI16

Source§

fn clone(&self) -> PositiveI16

Returns a copy 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 PositiveI16

Source§

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

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

impl Default for PositiveI16

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for PositiveI16

Source§

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

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

impl Div<u16> for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the / operator.
Source§

fn div(self, rhs: u16) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<u16> for PositiveI16

Source§

fn div_assign(&mut self, rhs: u16)

Performs the /= operation. Read more
Source§

impl DivAssign for PositiveI16

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl From<PositiveI16> for i128

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for i16

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for i32

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for i64

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for isize

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for u128

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for u16

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for u32

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for u64

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<PositiveI16> for usize

Source§

fn from(value: PositiveI16) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for PositiveI16

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl FromStr for PositiveI16

Source§

type Err = IntErrorKind

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for PositiveI16

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl LowerHex for PositiveI16

Source§

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

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

impl Not for PositiveI16

Source§

type Output = NegativeI16

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl Octal for PositiveI16

Source§

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

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

impl Ord for PositiveI16

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 PositiveI16

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 PositiveI16

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 Rem<u16> for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: u16) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem for PositiveI16

Source§

type Output = PositiveI16

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
Source§

impl RemAssign<u16> for PositiveI16

Source§

fn rem_assign(&mut self, rhs: u16)

Performs the %= operation. Read more
Source§

impl RemAssign for PositiveI16

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl TryFrom<PositiveI16> for i8

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<PositiveI16> for u8

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<i128> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<i16> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<i32> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<i64> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<i8> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<isize> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<u128> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<u16> for PositiveI16

Source§

type Error = TryFromIntError

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 TryFrom<u32> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<u64> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl TryFrom<usize> for PositiveI16

Source§

type Error = TryFromIntError

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

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

Performs the conversion.
Source§

impl UpperHex for PositiveI16

Source§

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

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

impl Copy for PositiveI16

Source§

impl Eq for PositiveI16

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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.