Enum core::num::fmt::Part

source ·
pub enum Part<'a> {
    Zero(usize),
    Num(u16),
    Copy(&'a [u8]),
}
🔬This is a nightly-only experimental API. (numfmt)
Expand description

Formatted parts.

Variants§

§

Zero(usize)

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

Given number of zero digits.

§

Num(u16)

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

A literal number up to 5 digits.

§

Copy(&'a [u8])

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

A verbatim copy of given bytes.

Implementations§

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

Returns the exact byte length of given part.

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

Writes a part 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
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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.

🔬This is a nightly-only experimental API. (sized_type_properties)
true if this type requires no storage. false if its size is greater than zero. Read more
🔬This is a nightly-only experimental API. (spec_option_partial_eq)
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.