pub struct Formatted<'a> {
    pub sign: &'static str,
    pub parts: &'a [Part<'a>],
}
🔬 This is a nightly-only experimental API. (numfmt)
Expand description

Formatted result containing one or more parts. This can be written to the byte buffer or converted to the allocated string.

Fields

sign: &'static str
🔬 This is a nightly-only experimental API. (numfmt)

A byte slice representing a sign, either "", "-" or "+".

parts: &'a [Part<'a>]
🔬 This is a nightly-only experimental API. (numfmt)

Formatted parts to be rendered after a sign and optional zero padding.

Implementations

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

Returns the exact byte length of combined formatted result.

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

Writes all formatted parts into the supplied buffer. Returns the number of written bytes, or None if the buffer is not enough. (It may still leave partially written bytes in the buffer; do not rely on that.)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.