pub struct Config { /* private fields */ }
Expand description

Configuration for Iso8601.

Implementations

Encode the configuration, permitting it to be used as a const parameter of Iso8601.

The value returned by this method must only be used as a const parameter to Iso8601. Any other usage is unspecified behavior.

A configuration for the Iso8601 format.

The following is the default behavior:

  • The configuration can be used for both formatting and parsing.
  • The date, time, and UTC offset are all formatted.
  • Separators (such as - and :) are included.
  • The year contains four digits, such that the year must be between 0 and 9999.
  • The date uses the calendar format.
  • The time has precision to the second and nine decimal digits.
  • The UTC offset has precision to the minute.

If you need different behavior, use the setter methods on this struct.

Set whether the format the date, time, and/or UTC offset.

Set whether the format contains separators (such as - or :).

Set whether the year is six digits.

Set the format used for the date.

Set the precision and number of decimal digits present for the time.

Set the precision for the UTC offset.

Trait Implementations

Formats the value using the given formatter. 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.

Should always be Self

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.

Calls the given closure and return the result. Read more

Calls the given closure on self.

Calls the given closure on self.

Calls the given closure if condition == true.