Struct ryu::Buffer [] [src]

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]

[src]

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

[src]

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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for Buffer
[src]

[src]

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