pub struct FixedPointNumber<I, F = I> {
pub integer: I,
pub fraction: F,
}
Expand description
固定小数点数
Fields§
§integer: I
整数部
fraction: F
小数部
Implementations§
Source§impl<I, F> FixedPointNumber<I, F>
impl<I, F> FixedPointNumber<I, F>
Trait Implementations§
Source§impl<I: Clone, F: Clone> Clone for FixedPointNumber<I, F>
impl<I: Clone, F: Clone> Clone for FixedPointNumber<I, F>
Source§fn clone(&self) -> FixedPointNumber<I, F>
fn clone(&self) -> FixedPointNumber<I, F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<I: Default, F: Default> Default for FixedPointNumber<I, F>
impl<I: Default, F: Default> Default for FixedPointNumber<I, F>
Source§fn default() -> FixedPointNumber<I, F>
fn default() -> FixedPointNumber<I, F>
Returns the “default value” for a type. Read more
Source§impl<I: Ord, F: Ord> Ord for FixedPointNumber<I, F>
impl<I: Ord, F: Ord> Ord for FixedPointNumber<I, F>
Source§fn cmp(&self, other: &FixedPointNumber<I, F>) -> Ordering
fn cmp(&self, other: &FixedPointNumber<I, F>) -> Ordering
1.21.0 · Source§fn 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
Source§impl<I: PartialOrd, F: PartialOrd> PartialOrd for FixedPointNumber<I, F>
impl<I: PartialOrd, F: PartialOrd> PartialOrd for FixedPointNumber<I, F>
impl<I: Copy, F: Copy> Copy for FixedPointNumber<I, F>
impl<I: Eq, F: Eq> Eq for FixedPointNumber<I, F>
impl<I, F> StructuralPartialEq for FixedPointNumber<I, F>
Auto Trait Implementations§
impl<I, F> Freeze for FixedPointNumber<I, F>
impl<I, F> RefUnwindSafe for FixedPointNumber<I, F>where
I: RefUnwindSafe,
F: RefUnwindSafe,
impl<I, F> Send for FixedPointNumber<I, F>
impl<I, F> Sync for FixedPointNumber<I, F>
impl<I, F> Unpin for FixedPointNumber<I, F>
impl<I, F> UnwindSafe for FixedPointNumber<I, F>where
I: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more