Implementations
sourceimpl<T, B> Xe<T, B>
impl<T, B> Xe<T, B>
pub fn from_parts(n: u64, t: T) -> Selfwhere
B: Default,
pub fn from_str_at_precision(s: &str, t: T) -> Result<Self, ()>where
B: Default,
isize: From<T>,
T: Copy,
pub fn from_quanta(n: u64) -> Selfwhere
T: Default,
B: Default,
pub fn from_u64(n: u64) -> Option<Self>where
T: Default,
B: Default + Pow<T>,
<B as Pow<T>>::Output: Unsigned,
pub fn from_f64(f: f64) -> Option<Self>where
T: Default,
B: Default + Pow<T>,
<B as Pow<T>>::Output: Unsigned,
pub fn truncated_div<T1, T2>(self, other: Xe<T1, B>) -> Xe<T2, B>where
T1: Add<T2>,
T2: Default,
Sum<T1, T2>: Sub<T>,
Diff<Sum<T1, T2>, T>: Unsigned,
B: Unsigned,
sourcepub fn truncated_mul<T1, T2>(self, other: Xe<T1, B>) -> Xe<T2, B>where
T: Add<T1>,
T2: Default,
Sum<T, T1>: Sub<T2>,
Diff<Sum<T, T1>, T2>: Unsigned,
B: Unsigned,
pub fn truncated_mul<T1, T2>(self, other: Xe<T1, B>) -> Xe<T2, B>where
T: Add<T1>,
T2: Default,
Sum<T, T1>: Sub<T2>,
Diff<Sum<T, T1>, T2>: Unsigned,
B: Unsigned,
The output type must be no greater in precision than the type that would accomodate the result of the multiplication without truncation (statically checked).
Trait Implementations
sourceimpl<T, B> Ord for Xe<T, B>
impl<T, B> Ord for Xe<T, B>
1.21.0 · sourcefn 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
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T, B> PartialEq<f64> for Xe<T, B>where
T: Default,
B: Default + Pow<T>,
<B as Pow<T>>::Output: Unsigned,
impl<T, B> PartialEq<f64> for Xe<T, B>where
T: Default,
B: Default + Pow<T>,
<B as Pow<T>>::Output: Unsigned,
sourceimpl<T, B> PartialOrd<Xe<T, B, u64>> for Xe<T, B>
impl<T, B> PartialOrd<Xe<T, B, u64>> for Xe<T, B>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<T: Copy, B: Copy, V: Copy> Copy for Xe<T, B, V>
impl<T, B> Eq for Xe<T, B>
Auto Trait Implementations
impl<T, B, V> RefUnwindSafe for Xe<T, B, V>where
B: RefUnwindSafe,
T: RefUnwindSafe,
V: RefUnwindSafe,
impl<T, B, V> Send for Xe<T, B, V>where
B: Send,
T: Send,
V: Send,
impl<T, B, V> Sync for Xe<T, B, V>where
B: Sync,
T: Sync,
V: Sync,
impl<T, B, V> Unpin for Xe<T, B, V>where
B: Unpin,
T: Unpin,
V: Unpin,
impl<T, B, V> UnwindSafe for Xe<T, B, V>where
B: UnwindSafe,
T: UnwindSafe,
V: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more