i96

Struct i96 

Source
pub struct i96(/* private fields */);

Implementations§

Source§

impl i96

Source

pub const BITS: u32 = 96u32

Source

pub const MIN: Self

Source

pub const MAX: Self

Source

pub const fn new(bits: i128) -> Option<Self>

truncates the upper bytes and sets them to zero

Source

pub const unsafe fn from_bits(bits: i128) -> Self

§Safety

the number must only have the first 12 with zeros, the upper bytes must NOT be filled

Source

pub const fn new_truncated(bits: i128) -> Self

truncates the upper bytes and sets them to zero

Source

pub const fn to_bits(self) -> i128

Source

pub const fn swapped_bytes(self) -> [u8; 12]

Source

pub const fn swap_bytes(self) -> Self

Source

pub const fn to_le(self) -> Self

Source

pub const fn to_be(self) -> Self

Source

pub const fn from_ne_bytes(bytes: [u8; 12]) -> Self

Source

pub const fn from_le_bytes(bytes: [u8; 12]) -> Self

Source

pub const fn from_be_bytes(bytes: [u8; 12]) -> Self

Source

pub const fn to_ne_bytes(self) -> [u8; 12]

Source

pub const fn to_le_bytes(self) -> [u8; 12]

Source

pub const fn to_be_bytes(self) -> [u8; 12]

Source

pub const fn get(self) -> i128

Source§

impl i96

Source

pub const fn from_str_radix( str: &str, radix: u32, ) -> Result<Self, ParseIntError>

Trait Implementations§

Source§

impl Add<&i96> for &i96

Source§

type Output = <i96 as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &i96) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&i96> for i96

Source§

type Output = <i96 as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: &i96) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<i96> for &i96

Source§

type Output = <i96 as Add>::Output

The resulting type after applying the + operator.
Source§

fn add(self, other: i96) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for i96

Source§

type Output = i96

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&i96> for i96

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign for i96

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for i96

Source§

fn clone(&self) -> i96

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 i96

Source§

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

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

impl Display for i96

Source§

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

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

impl Div<&i96> for &i96

Source§

type Output = <i96 as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &i96) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&i96> for i96

Source§

type Output = <i96 as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: &i96) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<i96> for &i96

Source§

type Output = <i96 as Div>::Output

The resulting type after applying the / operator.
Source§

fn div(self, other: i96) -> Self::Output

Performs the / operation. Read more
Source§

impl Div for i96

Source§

type Output = i96

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign<&i96> for i96

Source§

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

Performs the /= operation. Read more
Source§

impl DivAssign for i96

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl FromStr for i96

Source§

type Err = ParseIntError

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 i96

Source§

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

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

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

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

impl Mul<&i96> for &i96

Source§

type Output = <i96 as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i96) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&i96> for i96

Source§

type Output = <i96 as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: &i96) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<i96> for &i96

Source§

type Output = <i96 as Mul>::Output

The resulting type after applying the * operator.
Source§

fn mul(self, other: i96) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for i96

Source§

type Output = i96

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign<&i96> for i96

Source§

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

Performs the *= operation. Read more
Source§

impl MulAssign for i96

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl Ord for i96

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 i96

Source§

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

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

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

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

impl PartialOrd for i96

Source§

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

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

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

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

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

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

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

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

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

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

impl Rem<&i96> for &i96

Source§

type Output = <i96 as Rem>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i96) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<&i96> for i96

Source§

type Output = <i96 as Rem>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: &i96) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem<i96> for &i96

Source§

type Output = <i96 as Rem>::Output

The resulting type after applying the % operator.
Source§

fn rem(self, other: i96) -> Self::Output

Performs the % operation. Read more
Source§

impl Rem for i96

Source§

type Output = i96

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl RemAssign<&i96> for i96

Source§

fn rem_assign(&mut self, other: &i96)

Performs the %= operation. Read more
Source§

impl RemAssign for i96

Source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
Source§

impl Sub<&i96> for &i96

Source§

type Output = <i96 as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i96) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&i96> for i96

Source§

type Output = <i96 as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: &i96) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<i96> for &i96

Source§

type Output = <i96 as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub(self, other: i96) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for i96

Source§

type Output = i96

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign<&i96> for i96

Source§

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

Performs the -= operation. Read more
Source§

impl SubAssign for i96

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl Copy for i96

Source§

impl Eq for i96

Auto Trait Implementations§

§

impl Freeze for i96

§

impl RefUnwindSafe for i96

§

impl Send for i96

§

impl Sync for i96

§

impl Unpin for i96

§

impl UnwindSafe for i96

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.