[][src]Struct scalc::SCell

pub struct SCell<T> { /* fields omitted */ }

The structure which ensures the calculation safety

Methods

impl<T> SCell<T>[src]

pub fn new(data: T) -> Self[src]

Create a new SCell

pub fn get_data(&self) -> &T[src]

Get the data of underlying type T

impl<T: Zero> SCell<T>[src]

pub fn zero() -> Self[src]

See num crate for more information

pub fn is_zero(&self) -> bool[src]

See num crate for more information

impl<T: One + PartialEq> SCell<T>[src]

pub fn one() -> Self[src]

See num crate for more information

pub fn is_one(&self) -> bool[src]

See num crate for more information

impl<T: Num + CheckedAdd + CheckedSub + CheckedMul + CheckedDiv + CheckedRem> SCell<T>[src]

pub fn from_str_radix(str: &str, radix: u32) -> Result<Self, T::FromStrRadixErr>[src]

See num crate for more information

impl<T: Signed + CheckedAdd + CheckedSub + CheckedMul + CheckedDiv + CheckedRem + CheckedNeg + Ord + Copy> SCell<T>[src]

pub fn abs(&self) -> Option<Self>[src]

See num crate for more information

pub fn abs_sub(&self, other: &Self) -> Option<Self>[src]

See num crate for more information

pub fn signum(&self) -> Self[src]

See num crate for more information

pub fn is_positive(&self) -> bool[src]

See num crate for more information

pub fn is_negative(&self) -> bool[src]

See num crate for more information

Trait Implementations

impl<T: Copy> Copy for SCell<T>[src]

impl<T: Clone> Clone for SCell<T>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: PartialEq> PartialEq<SCell<T>> for SCell<T>[src]

impl<T: PartialOrd> PartialOrd<SCell<T>> for SCell<T>[src]

impl<T: Debug> Debug for SCell<T>[src]

impl<T: CheckedSub> Sub<SCell<T>> for SCell<T>[src]

type Output = Option<Self>

The resulting type after applying the - operator.

impl<T: CheckedAdd> Add<SCell<T>> for SCell<T>[src]

type Output = Option<Self>

The resulting type after applying the + operator.

impl<T: CheckedMul> Mul<SCell<T>> for SCell<T>[src]

type Output = Option<Self>

The resulting type after applying the * operator.

impl<T: CheckedDiv> Div<SCell<T>> for SCell<T>[src]

type Output = Option<Self>

The resulting type after applying the / operator.

impl<T: CheckedRem> Rem<SCell<T>> for SCell<T>[src]

type Output = Option<Self>

The resulting type after applying the % operator.

impl<T: CheckedNeg> Neg for SCell<T>[src]

type Output = Option<Self>

The resulting type after applying the - operator.

impl<T: Not> Not for SCell<T>[src]

type Output = SCell<T::Output>

The resulting type after applying the ! operator.

impl<T: FromStr> FromStr for SCell<T>[src]

type Err = T::Err

The associated error which can be returned from parsing.

Auto Trait Implementations

impl<T> Sync for SCell<T> where
    T: Sync

impl<T> Unpin for SCell<T> where
    T: Unpin

impl<T> Send for SCell<T> where
    T: Send

impl<T> UnwindSafe for SCell<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for SCell<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
    T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>, 
[src]