[][src]Enum arithmetic_sign::Sign

pub enum Sign {
    Negative,
    Positive,
}

Negative or Positive for sign marking and sign part calculations note: Need use std::convert::TryFrom if you want to use TryFrom<f32> or TryFrom<f64>

Variants

Negative

Negative, is a negative [-inf..0)

Positive

Positive, is not a negative [0..+inf]

Implementations

impl Sign[src]

pub fn to_string_specific<'a>(
    &self,
    if_negative: &'a str,
    if_positive: &'a str
) -> &'a str
[src]

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

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

pub fn as_f32(&self) -> f32[src]

pub fn as_f64(&self) -> f64[src]

pub fn as_i8(&self) -> i8[src]

pub fn as_i16(&self) -> i16[src]

pub fn as_i32(&self) -> i32[src]

pub fn as_i64(&self) -> i64[src]

pub fn as_i128(&self) -> i128[src]

pub fn as_u8(&self) -> Result<u8, ArithmeticSignError>[src]

pub fn as_u16(&self) -> Result<u16, ArithmeticSignError>[src]

pub fn as_u32(&self) -> Result<u32, ArithmeticSignError>[src]

pub fn as_u64(&self) -> Result<u64, ArithmeticSignError>[src]

pub fn as_u128(&self) -> Result<u128, ArithmeticSignError>[src]

Trait Implementations

impl Clone for Sign[src]

impl Copy for Sign[src]

impl Debug for Sign[src]

impl Display for Sign[src]

impl Div<Sign> for Sign[src]

type Output = Sign

The resulting type after applying the / operator.

impl Eq for Sign[src]

impl From<i128> for Sign[src]

impl From<i16> for Sign[src]

impl From<i32> for Sign[src]

impl From<i64> for Sign[src]

impl From<i8> for Sign[src]

impl From<u128> for Sign[src]

impl From<u16> for Sign[src]

impl From<u32> for Sign[src]

impl From<u64> for Sign[src]

impl From<u8> for Sign[src]

impl Mul<Sign> for Sign[src]

type Output = Sign

The resulting type after applying the * operator.

impl Neg for Sign[src]

type Output = Sign

The resulting type after applying the - operator.

impl Not for Sign[src]

type Output = Sign

The resulting type after applying the ! operator.

impl Ord for Sign[src]

impl PartialEq<Sign> for Sign[src]

impl PartialOrd<Sign> for Sign[src]

impl StructuralEq for Sign[src]

impl StructuralPartialEq for Sign[src]

impl TryFrom<f32> for Sign[src]

type Error = ArithmeticSignError

The type returned in the event of a conversion error.

impl TryFrom<f64> for Sign[src]

type Error = ArithmeticSignError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Sign

impl Send for Sign

impl Sync for Sign

impl Unpin for Sign

impl UnwindSafe for Sign

Blanket Implementations

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

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

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

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

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> ToString for T where
    T: Display + ?Sized
[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.