pub enum FieldLength {
    One,
    TwoDigit,
    Abbreviated,
    Wide,
    Narrow,
    Six,
    Fixed(u8),
}
Expand description

An enum representing the length of a field within a date or time formatting pattern string, in which the pattern field is represented as a letter occuring 1 or more times in a row, ex: MMM, dd, y. See the LDML documentation in UTS 35 for more details.

Variants

One

Typical style is 1-2 digits. For numeric-only fields.

TwoDigit

Typical style is 2 digits. For numeric-only fields.

Abbreviated

Abbreviated (spellout) format.

Wide

Wide / Long / Full (spellout) format.

Narrow

Narrow / Long / Full (spellout) format.

Six

Meaning is field-dependent, for patterns that are 6 characters long. Ex: a Weekday pattern like EEEEEE means “Short”, but jjjjjj or CCCCCC for Hour may mean “Numeric hour (2 digits, zero pad if needed), narrow dayPeriod if used”. See the LDML documentation in UTS 35 for more details.

Fixed(u8)

A fixed size format for numeric-only fields that is at most 127 digits.

Trait Implementations

The ULE type corresponding to Self. Read more

Converts from Self to Self::ULE. Read more

Converts from Self::ULE to Self. Read more

Returns a TokenStream that would evalutate to self. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. 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 resulting type after obtaining ownership.

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

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.