pub enum FloatVal<'a> {
    Nan {
        val: Option<u64>,
        negative: bool,
    },
    Inf {
        negative: bool,
    },
    Val {
        hex: bool,
        integral: Cow<'a, str>,
        decimal: Option<Cow<'a, str>>,
        exponent: Option<Cow<'a, str>>,
    },
}
Expand description

Possible parsed float values

Variants

Nan

Fields

val: Option<u64>

The specific bits to encode for this float, optionally

negative: bool

Whether or not this is a negative NaN or not.

A float NaN representation

Inf

Fields

negative: bool

An float infinite representation,

Val

Fields

hex: bool

Whether or not the integral and decimal are specified in hex

integral: Cow<'a, str>

The float parts before the .

decimal: Option<Cow<'a, str>>

The float parts after the .

exponent: Option<Cow<'a, str>>

The exponent to multiple this integral.decimal portion of the float by. If hex is true this is 2^exponent and otherwise it’s 10^exponent

A parsed and separated floating point value

Trait Implementations

Formats the value using the given formatter. Read more

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

This method tests for !=.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.