Struct decorum::NotNan
[−]
[src]
pub struct NotNan<T>(_)
where
T: Float;
Methods
impl<T> NotNan<T> where
T: Float,
[src]
T: Float,
fn from_raw_float(value: T) -> Result<Self, ()>
[src]
fn from_raw_float_unchecked(value: T) -> Self
[src]
fn into_raw_float(self) -> T
[src]
Trait Implementations
impl<'a, T> Deserialize<'a> for NotNan<T> where
T: Deserialize<'a> + Float,
[src]
T: Deserialize<'a> + Float,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'a>,
[src]
D: Deserializer<'a>,
Deserialize this value from the given Serde deserializer. Read more
impl<T> Serialize for NotNan<T> where
T: Float + Serialize,
[src]
T: Float + Serialize,
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T: Clone> Clone for NotNan<T> where
T: Float,
[src]
T: Float,
fn clone(&self) -> NotNan<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for NotNan<T> where
T: Float,
[src]
T: Float,
impl<T: Debug> Debug for NotNan<T> where
T: Float,
[src]
T: Float,
impl<T: Default> Default for NotNan<T> where
T: Float,
[src]
T: Float,
impl<T: PartialEq> PartialEq for NotNan<T> where
T: Float,
[src]
T: Float,
fn eq(&self, __arg_0: &NotNan<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &NotNan<T>) -> bool
[src]
This method tests for !=
.
impl<T: PartialOrd> PartialOrd for NotNan<T> where
T: Float,
[src]
T: Float,
fn partial_cmp(&self, __arg_0: &NotNan<T>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &NotNan<T>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &NotNan<T>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &NotNan<T>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &NotNan<T>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<T> AsRef<T> for NotNan<T> where
T: Float,
[src]
T: Float,
impl Into<f32> for NotNan<f32>
[src]
impl Into<f64> for NotNan<f64>
[src]
impl<T> Add for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self::Output
[src]
Performs the +
operation.
impl<T> Add<T> for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: T) -> Self::Output
[src]
Performs the +
operation.
impl<T> AddAssign for NotNan<T> where
T: Float,
[src]
T: Float,
fn add_assign(&mut self, other: Self)
[src]
Performs the +=
operation.
impl<T> AddAssign<T> for NotNan<T> where
T: Float,
[src]
T: Float,
fn add_assign(&mut self, other: T)
[src]
Performs the +=
operation.
impl<T> Bounded for NotNan<T> where
T: Float,
[src]
T: Float,
fn min_value() -> Self
[src]
returns the smallest finite number this type can represent
fn max_value() -> Self
[src]
returns the largest finite number this type can represent
impl<T> Display for NotNan<T> where
T: Display + Float,
[src]
T: Display + Float,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T> Div for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: Self) -> Self::Output
[src]
Performs the /
operation.
impl<T> Div<T> for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, other: T) -> Self::Output
[src]
Performs the /
operation.
impl<T> DivAssign for NotNan<T> where
T: Float,
[src]
T: Float,
fn div_assign(&mut self, other: Self)
[src]
Performs the /=
operation.
impl<T> DivAssign<T> for NotNan<T> where
T: Float,
[src]
T: Float,
fn div_assign(&mut self, other: T)
[src]
Performs the /=
operation.
impl<T> Eq for NotNan<T> where
T: Float,
[src]
T: Float,
impl<T> FromPrimitive for NotNan<T> where
T: Float + FromPrimitive,
[src]
T: Float + FromPrimitive,
fn from_i8(value: i8) -> Option<Self>
[src]
Convert an i8
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_u8(value: u8) -> Option<Self>
[src]
Convert an u8
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_i16(value: i16) -> Option<Self>
[src]
Convert an i16
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_u16(value: u16) -> Option<Self>
[src]
Convert an u16
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_i32(value: i32) -> Option<Self>
[src]
Convert an i32
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_u32(value: u32) -> Option<Self>
[src]
Convert an u32
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_i64(value: i64) -> Option<Self>
[src]
Convert an i64
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_u64(value: u64) -> Option<Self>
[src]
Convert an u64
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_isize(value: isize) -> Option<Self>
[src]
Convert an isize
to return an optional value of this type. If the value cannot be represented by this value, the None
is returned. Read more
fn from_usize(value: usize) -> Option<Self>
[src]
Convert a usize
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_f32(value: f32) -> Option<Self>
[src]
Convert a f32
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
fn from_f64(value: f64) -> Option<Self>
[src]
Convert a f64
to return an optional value of this type. If the type cannot be represented by this value, the None
is returned. Read more
impl<T> Hash for NotNan<T> where
T: Float,
[src]
T: Float,
fn hash<H>(&self, state: &mut H) where
H: Hasher,
[src]
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T> Mul for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: Self) -> Self::Output
[src]
Performs the *
operation.
impl<T> Mul<T> for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, other: T) -> Self::Output
[src]
Performs the *
operation.
impl<T> MulAssign for NotNan<T> where
T: Float,
[src]
T: Float,
fn mul_assign(&mut self, other: Self)
[src]
Performs the *=
operation.
impl<T> MulAssign<T> for NotNan<T> where
T: Float,
[src]
T: Float,
fn mul_assign(&mut self, other: T)
[src]
Performs the *=
operation.
impl<T> Neg for NotNan<T> where
T: Float + Num,
[src]
T: Float + Num,
type Output = Self
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
Performs the unary -
operation.
impl<T> Num for NotNan<T> where
T: Float + Num,
[src]
T: Float + Num,
type FromStrRadixErr = ()
fn from_str_radix(
source: &str,
radix: u32
) -> Result<Self, Self::FromStrRadixErr>
[src]
source: &str,
radix: u32
) -> Result<Self, Self::FromStrRadixErr>
Convert from a string and radix <= 36. Read more
impl<T> NumCast for NotNan<T> where
T: Float + Num,
[src]
T: Float + Num,
fn from<U>(value: U) -> Option<Self> where
U: ToPrimitive,
[src]
U: ToPrimitive,
Creates a number from another value that can be converted into a primitive via the ToPrimitive
trait. Read more
impl<T> One for NotNan<T> where
T: Float,
[src]
T: Float,
impl<T> Ord for NotNan<T> where
T: Float,
[src]
T: Float,
fn cmp(&self, other: &Self) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl<T> Real for NotNan<T> where
T: Float,
[src]
T: Float,
fn max_value() -> Self
[src]
fn min_value() -> Self
[src]
fn min_positive_value() -> Self
[src]
fn infinity() -> Self
[src]
fn neg_infinity() -> Self
[src]
fn is_infinite(self) -> bool
[src]
fn is_finite(self) -> bool
[src]
fn neg_zero() -> Self
[src]
fn is_sign_positive(self) -> bool
[src]
fn is_sign_negative(self) -> bool
[src]
fn classify(self) -> FpCategory
[src]
fn is_normal(self) -> bool
[src]
fn integer_decode(self) -> (u64, i16, i8)
[src]
fn hypot(self, other: Self) -> Self
[src]
fn sin(self) -> Self
[src]
fn cos(self) -> Self
[src]
fn tan(self) -> Self
[src]
fn asin(self) -> Self
[src]
fn acos(self) -> Self
[src]
fn atan(self) -> Self
[src]
fn atan2(self, other: Self) -> Self
[src]
fn sin_cos(self) -> (Self, Self)
[src]
fn sinh(self) -> Self
[src]
fn cosh(self) -> Self
[src]
fn tanh(self) -> Self
[src]
fn asinh(self) -> Self
[src]
fn acosh(self) -> Self
[src]
fn atanh(self) -> Self
[src]
impl<T> Rem for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: Self) -> Self::Output
[src]
Performs the %
operation.
impl<T> Rem<T> for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the %
operator.
fn rem(self, other: T) -> Self::Output
[src]
Performs the %
operation.
impl<T> RemAssign for NotNan<T> where
T: Float,
[src]
T: Float,
fn rem_assign(&mut self, other: Self)
[src]
Performs the %=
operation.
impl<T> RemAssign<T> for NotNan<T> where
T: Float,
[src]
T: Float,
fn rem_assign(&mut self, other: T)
[src]
Performs the %=
operation.
impl<T> Signed for NotNan<T> where
T: Float + Signed,
[src]
T: Float + Signed,
fn abs(&self) -> Self
[src]
Computes the absolute value. Read more
fn abs_sub(&self, other: &Self) -> Self
[src]
The positive difference of two numbers. Read more
fn signum(&self) -> Self
[src]
Returns the sign of the number. Read more
fn is_positive(&self) -> bool
[src]
Returns true if the number is positive and false if the number is zero or negative.
fn is_negative(&self) -> bool
[src]
Returns true if the number is negative and false if the number is zero or positive.
impl<T> Sub for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: Self) -> Self::Output
[src]
Performs the -
operation.
impl<T> Sub<T> for NotNan<T> where
T: Float,
[src]
T: Float,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, other: T) -> Self::Output
[src]
Performs the -
operation.
impl<T> SubAssign for NotNan<T> where
T: Float,
[src]
T: Float,
fn sub_assign(&mut self, other: Self)
[src]
Performs the -=
operation.
impl<T> SubAssign<T> for NotNan<T> where
T: Float,
[src]
T: Float,
fn sub_assign(&mut self, other: T)
[src]
Performs the -=
operation.
impl<T> ToPrimitive for NotNan<T> where
T: Float + ToPrimitive,
[src]
T: Float + ToPrimitive,
fn to_i8(&self) -> Option<i8>
[src]
Converts the value of self
to an i8
.
fn to_u8(&self) -> Option<u8>
[src]
Converts the value of self
to an u8
.
fn to_i16(&self) -> Option<i16>
[src]
Converts the value of self
to an i16
.
fn to_u16(&self) -> Option<u16>
[src]
Converts the value of self
to an u16
.
fn to_i32(&self) -> Option<i32>
[src]
Converts the value of self
to an i32
.
fn to_u32(&self) -> Option<u32>
[src]
Converts the value of self
to an u32
.
fn to_i64(&self) -> Option<i64>
[src]
Converts the value of self
to an i64
.
fn to_u64(&self) -> Option<u64>
[src]
Converts the value of self
to an u64
.
fn to_isize(&self) -> Option<isize>
[src]
Converts the value of self
to an isize
.
fn to_usize(&self) -> Option<usize>
[src]
Converts the value of self
to a usize
.
fn to_f32(&self) -> Option<f32>
[src]
Converts the value of self
to an f32
.
fn to_f64(&self) -> Option<f64>
[src]
Converts the value of self
to an f64
.
impl<T> Zero for NotNan<T> where
T: Float,
[src]
T: Float,