[−][src]Struct hexponent::FloatLiteral
Represents a floating point literal
This struct is a representation of the text, that can be used to convert to both single- and double-precision floats.
FloatLiteral
is not Copy
-able because it contains a vector of the
digits from the source data.
Implementations
impl FloatLiteral
[src]
pub fn convert<F: FPFormat>(self) -> ConversionResult<F>
[src]
Convert the self
to an f32
or f64
and return the precision of the
conversion.
pub fn from_bytes(data: &[u8]) -> Result<FloatLiteral, ParseError>
[src]
Parse a slice of bytes into a FloatLiteral
.
This is based on hexadecimal floating constants in the C11 specification, section 6.4.4.2.
Trait Implementations
impl Clone for FloatLiteral
[src]
fn clone(&self) -> FloatLiteral
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FloatLiteral
[src]
impl From<FloatLiteral> for f32
[src]
fn from(literal: FloatLiteral) -> f32
[src]
impl From<FloatLiteral> for f64
[src]
fn from(literal: FloatLiteral) -> f64
[src]
impl FromStr for FloatLiteral
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<FloatLiteral, ParseError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for FloatLiteral
impl Send for FloatLiteral
impl Sync for FloatLiteral
impl Unpin for FloatLiteral
impl UnwindSafe for FloatLiteral
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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.
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>,