Struct Mag

Source
pub struct Mag { /* private fields */ }

Implementations§

Source§

impl Mag

Source

pub fn zero() -> Self

Source

pub fn one() -> Self

Source

pub fn zero_assign(&mut self)

Source

pub fn one_assign(&mut self)

Source

pub fn is_zero(&self) -> bool

Source

pub const fn as_ptr(&self) -> *const mag_struct

Source

pub fn as_mut_ptr(&mut self) -> *mut mag_struct

Source

pub const unsafe fn from_raw(inner: mag_struct) -> Self

Source

pub const fn into_raw(self) -> mag_struct

Source

pub fn mantissa_exponent(&self) -> (u64, Integer)

Return the mantissa m and exponent exp such that x = m*2^exp.

Trait Implementations§

Source§

impl AsRef<Mag> for Mag

Source§

fn as_ref(&self) -> &Mag

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Assign<&Integer> for Mag

Source§

fn assign(&mut self, src: &Integer)

Source§

impl Assign<&Mag> for Arf

Source§

fn assign(&mut self, src: &Mag)

Source§

impl Assign<&Mag> for Mag

Source§

fn assign(&mut self, src: &Mag)

Source§

impl Assign<&f32> for Mag

Source§

fn assign(&mut self, src: &f32)

Source§

impl Assign<&f64> for Mag

Source§

fn assign(&mut self, src: &f64)

Source§

impl Assign<&u16> for Mag

Source§

fn assign(&mut self, src: &u16)

Source§

impl Assign<&u32> for Mag

Source§

fn assign(&mut self, src: &u32)

Source§

impl Assign<&u64> for Mag

Source§

fn assign(&mut self, src: &u64)

Source§

impl Assign<&u8> for Mag

Source§

fn assign(&mut self, src: &u8)

Source§

impl Assign<&usize> for Mag

Source§

fn assign(&mut self, src: &usize)

Source§

impl Assign<Integer> for Mag

Source§

fn assign(&mut self, src: Integer)

Source§

impl Assign<Mag> for Arf

Source§

fn assign(&mut self, src: Mag)

Source§

impl Assign<f32> for Mag

Source§

fn assign(&mut self, src: f32)

Source§

impl Assign<f64> for Mag

Source§

fn assign(&mut self, src: f64)

Source§

impl Assign<u16> for Mag

Source§

fn assign(&mut self, src: u16)

Source§

impl Assign<u32> for Mag

Source§

fn assign(&mut self, src: u32)

Source§

impl Assign<u64> for Mag

Source§

fn assign(&mut self, src: u64)

Source§

impl Assign<u8> for Mag

Source§

fn assign(&mut self, src: u8)

Source§

impl Assign<usize> for Mag

Source§

fn assign(&mut self, src: usize)

Source§

impl Assign for Mag

Source§

fn assign(&mut self, src: Mag)

Source§

impl Clone for Mag

Source§

fn clone(&self) -> Self

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Mag

Source§

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

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

impl Default for Mag

Source§

fn default() -> Self

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

impl Display for Mag

Source§

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

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

impl Drop for Mag

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<&Integer> for Mag

Source§

fn from(src: &Integer) -> Mag

Converts to this type from the input type.
Source§

impl From<&Mag> for Arf

Source§

fn from(src: &Mag) -> Arf

Converts to this type from the input type.
Source§

impl From<&f32> for Mag

Source§

fn from(src: &f32) -> Mag

Converts to this type from the input type.
Source§

impl From<&f64> for Mag

Source§

fn from(src: &f64) -> Mag

Converts to this type from the input type.
Source§

impl From<&u16> for Mag

Source§

fn from(src: &u16) -> Mag

Converts to this type from the input type.
Source§

impl From<&u32> for Mag

Source§

fn from(src: &u32) -> Mag

Converts to this type from the input type.
Source§

impl From<&u64> for Mag

Source§

fn from(src: &u64) -> Mag

Converts to this type from the input type.
Source§

impl From<&u8> for Mag

Source§

fn from(src: &u8) -> Mag

Converts to this type from the input type.
Source§

impl From<&usize> for Mag

Source§

fn from(src: &usize) -> Mag

Converts to this type from the input type.
Source§

impl From<Integer> for Mag

Source§

fn from(src: Integer) -> Mag

Converts to this type from the input type.
Source§

impl From<Mag> for Arf

Source§

fn from(src: Mag) -> Arf

Converts to this type from the input type.
Source§

impl From<f32> for Mag

Source§

fn from(src: f32) -> Mag

Converts to this type from the input type.
Source§

impl From<f64> for Mag

Source§

fn from(src: f64) -> Mag

Converts to this type from the input type.
Source§

impl From<u16> for Mag

Source§

fn from(src: u16) -> Mag

Converts to this type from the input type.
Source§

impl From<u32> for Mag

Source§

fn from(src: u32) -> Mag

Converts to this type from the input type.
Source§

impl From<u64> for Mag

Source§

fn from(src: u64) -> Mag

Converts to this type from the input type.
Source§

impl From<u8> for Mag

Source§

fn from(src: u8) -> Mag

Converts to this type from the input type.
Source§

impl From<usize> for Mag

Source§

fn from(src: usize) -> Mag

Converts to this type from the input type.
Source§

impl Hash for Mag

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 New<&Mag> for Mag

Source§

fn new(src: &Mag) -> Self

Source§

impl<T: Into<Mag>> New<T> for Mag

Source§

fn new(src: T) -> Self

Auto Trait Implementations§

§

impl Freeze for Mag

§

impl RefUnwindSafe for Mag

§

impl Send for Mag

§

impl Sync for Mag

§

impl Unpin for Mag

§

impl UnwindSafe for Mag

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.