Struct embassy_hal_internal::ratio::Ratio
source · pub struct Ratio<T> { /* private fields */ }
Expand description
Represents the ratio between two numbers.
Implementations§
source§impl<T: CheckedDiv> Ratio<T>
impl<T: CheckedDiv> Ratio<T>
sourcepub fn to_integer(&self) -> T
pub fn to_integer(&self) -> T
Converts to an integer, rounding towards zero.
Trait Implementations§
source§impl<T: CheckedMul + CheckedAdd> Add<T> for Ratio<T>
impl<T: CheckedMul + CheckedAdd> Add<T> for Ratio<T>
source§impl<T: CheckedMul> Div<T> for Ratio<T>
impl<T: CheckedMul> Div<T> for Ratio<T>
source§impl<T: CheckedMul> Mul<T> for Ratio<T>
impl<T: CheckedMul> Mul<T> for Ratio<T>
impl<T: Copy> Copy for Ratio<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Ratio<T>where
T: RefUnwindSafe,
impl<T> Send for Ratio<T>where
T: Send,
impl<T> Sync for Ratio<T>where
T: Sync,
impl<T> Unpin for Ratio<T>where
T: Unpin,
impl<T> UnwindSafe for Ratio<T>where
T: 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