pub struct SCell<T> { /* private fields */ }
Expand description
The structure which ensures the calculation safety
Implementations§
Source§impl<T: Num + CheckedAdd + CheckedSub + CheckedMul + CheckedDiv + CheckedRem> SCell<T>
impl<T: Num + CheckedAdd + CheckedSub + CheckedMul + CheckedDiv + CheckedRem> SCell<T>
Sourcepub fn from_str_radix(str: &str, radix: u32) -> Result<Self, T::FromStrRadixErr>
pub fn from_str_radix(str: &str, radix: u32) -> Result<Self, T::FromStrRadixErr>
See num
crate for more information
Source§impl<T: Signed + CheckedAdd + CheckedSub + CheckedMul + CheckedDiv + CheckedRem + CheckedNeg + Ord + Copy> SCell<T>
impl<T: Signed + CheckedAdd + CheckedSub + CheckedMul + CheckedDiv + CheckedRem + CheckedNeg + Ord + Copy> SCell<T>
Sourcepub fn is_positive(&self) -> bool
pub fn is_positive(&self) -> bool
See num
crate for more information
Sourcepub fn is_negative(&self) -> bool
pub fn is_negative(&self) -> bool
See num
crate for more information
Trait Implementations§
Source§impl<T: CheckedAdd> Add for SCell<T>
impl<T: CheckedAdd> Add for SCell<T>
Source§impl<T: CheckedDiv> Div for SCell<T>
impl<T: CheckedDiv> Div for SCell<T>
Source§impl<T: CheckedMul> Mul for SCell<T>
impl<T: CheckedMul> Mul for SCell<T>
Source§impl<T: CheckedNeg> Neg for SCell<T>
impl<T: CheckedNeg> Neg for SCell<T>
Source§impl<T: PartialOrd> PartialOrd for SCell<T>
impl<T: PartialOrd> PartialOrd for SCell<T>
Source§impl<T: CheckedRem> Rem for SCell<T>
impl<T: CheckedRem> Rem for SCell<T>
Source§impl<T: CheckedSub> Sub for SCell<T>
impl<T: CheckedSub> Sub for SCell<T>
impl<T: Copy> Copy for SCell<T>
impl<T> StructuralPartialEq for SCell<T>
Auto Trait Implementations§
impl<T> Freeze for SCell<T>where
T: Freeze,
impl<T> RefUnwindSafe for SCell<T>where
T: RefUnwindSafe,
impl<T> Send for SCell<T>where
T: Send,
impl<T> Sync for SCell<T>where
T: Sync,
impl<T> Unpin for SCell<T>where
T: Unpin,
impl<T> UnwindSafe for SCell<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