Struct actix_web::cookie::time::format_description::well_known::iso8601::Config
source · pub struct Config { /* private fields */ }
Available on crate feature
cookies
and (crate features formatting
or parsing
) only.Expand description
Configuration for Iso8601
.
Implementations§
source§impl Config
impl Config
sourcepub const DEFAULT: Config = _
pub const DEFAULT: Config = _
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.
sourcepub const fn set_formatted_components(
self,
formatted_components: FormattedComponents,
) -> Config
pub const fn set_formatted_components( self, formatted_components: FormattedComponents, ) -> Config
Set whether the format the date, time, and/or UTC offset.
sourcepub const fn set_use_separators(self, use_separators: bool) -> Config
pub const fn set_use_separators(self, use_separators: bool) -> Config
Set whether the format contains separators (such as -
or :
).
sourcepub const fn set_year_is_six_digits(self, year_is_six_digits: bool) -> Config
pub const fn set_year_is_six_digits(self, year_is_six_digits: bool) -> Config
Set whether the year is six digits.
sourcepub const fn set_date_kind(self, date_kind: DateKind) -> Config
pub const fn set_date_kind(self, date_kind: DateKind) -> Config
Set the format used for the date.
sourcepub const fn set_time_precision(self, time_precision: TimePrecision) -> Config
pub const fn set_time_precision(self, time_precision: TimePrecision) -> Config
Set the precision and number of decimal digits present for the time.
sourcepub const fn set_offset_precision(
self,
offset_precision: OffsetPrecision,
) -> Config
pub const fn set_offset_precision( self, offset_precision: OffsetPrecision, ) -> Config
Set the precision for the UTC offset.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more