Enum number_general::Float[][src]

pub enum Float {
    F32(f32),
    F64(f64),
}
Expand description

A floating-point number.

Variants

F32(f32)

Tuple Fields of F32

0: f32
F64(f64)

Tuple Fields of F64

0: f64

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Cast an instance of T into an instance of Self.

Cast an instance of T into an instance of Self.

Cast an instance of T into an instance of Self.

Cast an instance of T into an instance of Self.

Cast an instance of T into an instance of Self.

Cast an instance of T into an instance of Self.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

Performs the /= operation. Read more

Return true if this Number is infinite (e.g. [f32::INF]).

Return true if this is not a valid number (NaN).

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

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

Parse this value using the given Decoder.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Take ownership of this value and serialize it into the given encoder.

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

Get an impl of NumberClass describing this number.

Cast this number into the specified NumberClass.

Calculate the absolute value of this number.

Raise e to the power of this number.

Raise this number to the given exponent. Read more

Return true if self and other are nonzero.

Return true if this number is zero.

Return true if self or other is nonzero.

Return true if exactly one of self and other is zero.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Method which takes an iterator and generates Self from the elements by multiplying the items. Read more

Serialize this value into the given Serde serializer. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more

Serialize this value into the given encoder.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Cast an instance of T into an instance of Self.

Cast an instance of Self into an instance of T.

Performs the conversion.

Performs the conversion.

Returns true if self can be cast into the target type T.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

Test if value can be cast into Self.

Returns Some(Self) if the source value can be cast into Self, otherwise None.

Returns Ok(Self) if the source value can be cast into Self, otherwise calls on_err.

Test if self can be cast into T.

Returns Some(T) if self can be cast into T, otherwise None.

Returns Ok(T) if self can be cast into T, otherwise calls on_err.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.