[][src]Trait fast_float::FastFloat

pub trait FastFloat: Float {
    pub fn parse_float<S: AsRef<[u8]>>(s: S) -> Result<Self> { ... }
pub fn parse_float_partial<S: AsRef<[u8]>>(s: S) -> Result<(Self, usize)> { ... } }

Trait for numerical float types that can be parsed from string.

Provided methods

pub fn parse_float<S: AsRef<[u8]>>(s: S) -> Result<Self>[src]

Parse a decimal number from string into float (full).

Errors

Will return an error either if the string is not a valid decimal number. or if any characterse are left remaining unparsed.

pub fn parse_float_partial<S: AsRef<[u8]>>(s: S) -> Result<(Self, usize)>[src]

Parse a decimal number from string into float (partial).

This method parses as many characters as possible and returns the resulting number along with the number of digits processed (in case of success, this number is always positive).

Errors

Will return an error either if the string doesn't start with a valid decimal number – that is, if no zero digits were processed.

Loading content...

Implementations on Foreign Types

impl FastFloat for f32[src]

impl FastFloat for f64[src]

Loading content...

Implementors

Loading content...