Enum wast::lexer::FloatVal[][src]

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

A float NaN representation

Fields of Nan

val: Option<u64>

The specific bits to encode for this float, optionally

negative: bool

Whether or not this is a negative NaN or not.

Inf

An float infinite representation,

Fields of Inf

negative: bool
Val

A parsed and separated floating point value

Fields of Val

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

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

Performs the conversion.

Performs the conversion.

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.