[][src]Struct ryu::Buffer

pub struct Buffer { /* fields omitted */ }

Safe API for formatting floating point numbers to text.

Example

let mut buffer = ryu::Buffer::new();
let printed = buffer.format(1.234);
assert_eq!(printed, "1.234");

Methods

impl Buffer
[src]

This is a cheap operation; you don't need to worry about reusing buffers for efficiency.

Print a floating point number into this buffer and return a reference to its string representation within the buffer.

Special cases

This function does not check for NaN or infinity. If the input number is not a finite float, the printed representation will be some correctly formatted but unspecified numerical value.

Please check is_finite yourself before calling this function, or check is_nan and is_infinite and handle those cases yourself.

Trait Implementations

impl Copy for Buffer
[src]

impl Clone for Buffer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for Buffer
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for Buffer

impl Sync for Buffer

Blanket Implementations

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more