logo
pub enum DisplayHint {
    NoHint {
        zero_pad: usize,
    },
    Hexadecimal {
        alternate: bool,
        uppercase: bool,
        zero_pad: usize,
    },
    Binary {
        alternate: bool,
        zero_pad: usize,
    },
    Ascii,
    Debug,
    Microseconds,
    ISO8601(TimePrecision),
    Bitflags {
        name: String,
        package: String,
        disambiguator: String,
    },
    Unknown(String),
}
This is supported on unstable only.
Expand description

All display hints

Variants

NoHint

Fields

zero_pad: usize

Hexadecimal

Fields

alternate: bool
uppercase: bool
zero_pad: usize

:x OR :X

Binary

Fields

alternate: bool
zero_pad: usize

:b

Ascii

:a

Debug

:?

Microseconds

:us, formats integers as timestamps in microseconds

ISO8601(TimePrecision)

:iso8601{ms,s}, formats integers as timestamp in ISO8601 date time format

Bitflags

Fields

name: String
package: String
disambiguator: String

__internal_bitflags_NAME instructs the decoder to print the flags that are set, instead of the raw value.

Unknown(String)

Display hints currently not supported / understood

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 !=.

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

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.