[−][src]Enum number_general::Number
A generic number.
Variants
Bool(Boolean)
Complex(Complex)
Float(Float)
Int(Int)
UInt(UInt)
Implementations
impl Number
[src]
Trait Implementations
impl Add<Number> for Number
[src]
type Output = Self
The resulting type after applying the +
operator.
pub fn add(self, other: Number) -> Self
[src]
impl AddAssign<Number> for Number
[src]
pub fn add_assign(&mut self, other: Self)
[src]
impl CastFrom<Number> for Complex
[src]
impl CastFrom<Number> for Boolean
[src]
impl CastFrom<Number> for Float
[src]
impl CastFrom<Number> for Int
[src]
impl CastFrom<Number> for UInt
[src]
impl Clone for Number
[src]
impl Copy for Number
[src]
impl Debug for Number
[src]
impl Default for Number
[src]
impl<'de> Deserialize<'de> for Number
[src]
pub fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error>
[src]
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error>
impl Display for Number
[src]
impl Div<Number> for Number
[src]
type Output = Self
The resulting type after applying the /
operator.
pub fn div(self, other: Number) -> Self
[src]
impl DivAssign<Number> for Number
[src]
pub fn div_assign(&mut self, other: Self)
[src]
impl Eq for Number
[src]
impl From<Boolean> for Number
[src]
impl From<Complex<f32>> for Number
[src]
impl From<Complex<f64>> for Number
[src]
impl From<Complex> for Number
[src]
impl From<Float> for Number
[src]
impl From<Int> for Number
[src]
impl From<UInt> for Number
[src]
impl From<bool> for Number
[src]
impl From<f32> for Number
[src]
impl From<f64> for Number
[src]
impl From<i16> for Number
[src]
impl From<i32> for Number
[src]
impl From<i64> for Number
[src]
impl From<u16> for Number
[src]
impl From<u32> for Number
[src]
impl From<u64> for Number
[src]
impl From<u8> for Number
[src]
impl FromStream for Number
[src]
pub fn from_stream<'life0, 'async_trait, D: Decoder>(
decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Self, <D as Decoder>::Error>> + Send + 'async_trait>> where
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
[src]
decoder: &'life0 mut D
) -> Pin<Box<dyn Future<Output = Result<Self, <D as Decoder>::Error>> + Send + 'async_trait>> where
D: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
impl Mul<Number> for Number
[src]
type Output = Self
The resulting type after applying the *
operator.
pub fn mul(self, other: Number) -> Self
[src]
impl MulAssign<Number> for Number
[src]
pub fn mul_assign(&mut self, other: Self)
[src]
impl NumberInstance for Number
[src]
type Abs = Number
type Exp = Self
type Class = NumberType
pub fn class(&self) -> NumberType
[src]
pub fn into_type(self, dtype: NumberType) -> Number
[src]
pub fn abs(self) -> Number
[src]
pub fn pow(self, exp: Self) -> Self
[src]
pub fn and(self, other: Self) -> Self where
Boolean: CastFrom<Self>,
[src]
Boolean: CastFrom<Self>,
pub fn not(self) -> Self where
Boolean: CastFrom<Self>,
[src]
Boolean: CastFrom<Self>,
pub fn or(self, other: Self) -> Self where
Boolean: CastFrom<Self>,
[src]
Boolean: CastFrom<Self>,
pub fn xor(self, other: Self) -> Self where
Boolean: CastFrom<Self>,
[src]
Boolean: CastFrom<Self>,
impl PartialEq<Number> for Number
[src]
pub fn eq(&self, other: &Self) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Number> for Number
[src]
pub fn partial_cmp(&self, other: &Number) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl Product<Number> for Number
[src]
impl Serialize for Number
[src]
impl StructuralEq for Number
[src]
impl Sub<Number> for Number
[src]
type Output = Self
The resulting type after applying the -
operator.
pub fn sub(self, other: Number) -> Self
[src]
impl SubAssign<Number> for Number
[src]
pub fn sub_assign(&mut self, other: Self)
[src]
impl Sum<Number> for Number
[src]
impl<'en> ToStream<'en> for Number
[src]
Auto Trait Implementations
impl RefUnwindSafe for Number
[src]
impl Send for Number
[src]
impl Sync for Number
[src]
impl Unpin for Number
[src]
impl UnwindSafe for Number
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<F, T> CastFrom<F> for T where
T: From<F>,
[src]
T: From<F>,
impl<T, F> CastInto<F> for T where
F: CastFrom<T>,
[src]
F: CastFrom<T>,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<F> Match for F
[src]
pub fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
[src]
T: TryCastFrom<Self>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
[src]
T: CastFrom<F>,
pub fn can_cast_from(&F) -> bool
[src]
pub fn opt_cast_from(f: F) -> Option<T>
[src]
pub fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
[src]
OnErr: FnOnce(&T) -> Err,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
[src]
T: TryCastFrom<F>,
pub fn can_cast_into(&self) -> bool
[src]
pub fn opt_cast_into(self) -> Option<T>
[src]
pub fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
[src]
OnErr: FnOnce(&Self) -> Err,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,