Enum tinychain::scalar::Number[]

pub enum Number {
    Bool(Boolean),
    Complex(Complex),
    Float(Float),
    Int(Int),
    UInt(UInt),
}

A generic number.

Variants

Bool(Boolean)
Complex(Complex)
Float(Float)
Int(Int)
UInt(UInt)

Implementations

impl Number

pub fn is_real(&self) -> bool

Trait Implementations

impl Add<Number> for Number

type Output = Number

The resulting type after applying the + operator.

impl AddAssign<Number> for Number

impl CastFrom<Number> for Float

impl CastFrom<Number> for UInt

impl CastFrom<Number> for Boolean

impl CastFrom<Number> for Complex

impl CastFrom<Number> for Int

impl Clone for Number

impl Copy for Number

impl Debug for Number

impl Default for Number

impl<'de> Deserialize<'de> for Number

impl Display for Number

impl Div<Number> for Number

type Output = Number

The resulting type after applying the / operator.

impl DivAssign<Number> for Number

impl Eq for Number

impl From<Boolean> for Number

impl From<Complex<f32>> for Number

impl From<Complex<f64>> for Number

impl From<Complex> for Number

impl From<Float> for Number

impl From<Int> for Number

impl From<Number> for Value[src]

impl From<UInt> for Number

impl From<bool> for Number

impl From<f32> for Number

impl From<f64> for Number

impl From<i16> for Number

impl From<i32> for Number

impl From<i64> for Number

impl From<i8> for Number

impl From<u16> for Number

impl From<u32> for Number

impl From<u64> for Number

impl From<u8> for Number

impl FromStream for Number

type Context = ()

The decoding context of this type, useful in situations where the stream to be decoded may be too large to hold in main memory. Read more

impl Hash for Number

impl<'en> IntoStream<'en> for Number

impl Mul<Number> for Number

type Output = Number

The resulting type after applying the * operator.

impl MulAssign<Number> for Number

impl NumberInstance for Number

type Abs = Number

type Exp = Number

type Class = NumberType

impl PartialEq<Number> for Number

impl PartialOrd<Number> for Number

impl Product<Number> for Number

impl Serialize for Number

impl StructuralEq for Number

impl Sub<Number> for Number

type Output = Number

The resulting type after applying the - operator.

impl SubAssign<Number> for Number

impl Sum<Number> for Number

impl<'en> ToStream<'en> for Number

impl TryCastFrom<Scalar> for Number[src]

impl TryCastFrom<Value> for Number[src]

Auto Trait Implementations

impl RefUnwindSafe for Number

impl Send for Number

impl Sync for Number

impl Unpin for Number

impl UnwindSafe for Number

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<F, T> CastFrom<F> for T where
    T: From<F>, 
[src]

impl<T, F> CastInto<F> for T where
    F: CastFrom<T>, 
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

impl<T> Instrument for T[src]

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

impl<F> Match for F[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

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<F, T> TryCastFrom<F> for T where
    T: CastFrom<F>, 
[src]

impl<F, T> TryCastInto<T> for F where
    T: TryCastFrom<F>, 
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,