Struct actix_web::cookie::time::format_description::well_known::Iso8601
source · pub struct Iso8601<const CONFIG: u128 = time::::format_description::well_known::iso8601::Iso8601::{constant#0}>;
Expand description
The format described in ISO 8601.
This implementation is of ISO 8601-1:2019. It may not be compatible with other versions.
The const parameter CONFIG
must be a value that was returned by Config::encode
.
Passing any other value is unspecified behavior.
Example: 1997-11-21T09:55:06.000000000-06:00
§Examples
assert_eq!(
datetime!(1997-11-12 9:55:06 -6:00).format(&Iso8601::DEFAULT)?,
"1997-11-12T09:55:06.000000000-06:00"
);
Implementations§
source§impl Iso8601<time::::format_description::well_known::iso8601::{impl#7}::{constant#0}>
impl Iso8601<time::::format_description::well_known::iso8601::{impl#7}::{constant#0}>
sourcepub const DEFAULT: Iso8601<time::::format_description::well_known::iso8601::{impl#7}::{constant#0}> = Self
pub const DEFAULT: Iso8601<time::::format_description::well_known::iso8601::{impl#7}::{constant#0}> = Self
An Iso8601
with the default configuration.
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 another associated constant. For full customization, use
Config::DEFAULT
and Config
’s methods to create a custom configuration.
source§impl Iso8601<time::::format_description::well_known::iso8601::{impl#9}::{constant#0}>
impl Iso8601<time::::format_description::well_known::iso8601::{impl#9}::{constant#0}>
sourcepub const DATE: Iso8601<time::::format_description::well_known::iso8601::{impl#9}::{constant#0}> = Self
pub const DATE: Iso8601<time::::format_description::well_known::iso8601::{impl#9}::{constant#0}> = Self
An Iso8601
that handles only the date, but is otherwise the same as Config::DEFAULT
.
source§impl Iso8601<time::::format_description::well_known::iso8601::{impl#10}::{constant#0}>
impl Iso8601<time::::format_description::well_known::iso8601::{impl#10}::{constant#0}>
sourcepub const TIME: Iso8601<time::::format_description::well_known::iso8601::{impl#10}::{constant#0}> = Self
pub const TIME: Iso8601<time::::format_description::well_known::iso8601::{impl#10}::{constant#0}> = Self
An Iso8601
that handles only the time, but is otherwise the same as Config::DEFAULT
.
source§impl Iso8601<time::::format_description::well_known::iso8601::{impl#11}::{constant#0}>
impl Iso8601<time::::format_description::well_known::iso8601::{impl#11}::{constant#0}>
sourcepub const OFFSET: Iso8601<time::::format_description::well_known::iso8601::{impl#11}::{constant#0}> = Self
pub const OFFSET: Iso8601<time::::format_description::well_known::iso8601::{impl#11}::{constant#0}> = Self
An Iso8601
that handles only the UTC offset, but is otherwise the same as
Config::DEFAULT
.
source§impl Iso8601<time::::format_description::well_known::iso8601::{impl#12}::{constant#0}>
impl Iso8601<time::::format_description::well_known::iso8601::{impl#12}::{constant#0}>
sourcepub const DATE_TIME: Iso8601<time::::format_description::well_known::iso8601::{impl#12}::{constant#0}> = Self
pub const DATE_TIME: Iso8601<time::::format_description::well_known::iso8601::{impl#12}::{constant#0}> = Self
An Iso8601
that handles the date and time, but is otherwise the same as
Config::DEFAULT
.
source§impl Iso8601<time::::format_description::well_known::iso8601::{impl#13}::{constant#0}>
impl Iso8601<time::::format_description::well_known::iso8601::{impl#13}::{constant#0}>
sourcepub const DATE_TIME_OFFSET: Iso8601<time::::format_description::well_known::iso8601::{impl#13}::{constant#0}> = Self
pub const DATE_TIME_OFFSET: Iso8601<time::::format_description::well_known::iso8601::{impl#13}::{constant#0}> = Self
An Iso8601
that handles the date, time, and UTC offset. This is the same as
Config::DEFAULT
.
source§impl Iso8601<time::::format_description::well_known::iso8601::{impl#14}::{constant#0}>
impl Iso8601<time::::format_description::well_known::iso8601::{impl#14}::{constant#0}>
sourcepub const TIME_OFFSET: Iso8601<time::::format_description::well_known::iso8601::{impl#14}::{constant#0}> = Self
pub const TIME_OFFSET: Iso8601<time::::format_description::well_known::iso8601::{impl#14}::{constant#0}> = Self
An Iso8601
that handles the time and UTC offset, but is otherwise the same as
Config::DEFAULT
.
Trait Implementations§
source§impl<const CONFIG: u128> PartialEq for Iso8601<CONFIG>
impl<const CONFIG: u128> PartialEq for Iso8601<CONFIG>
impl<const CONFIG: u128> Copy for Iso8601<CONFIG>
impl<const CONFIG: u128> Eq for Iso8601<CONFIG>
impl<const CONFIG: u128> Formattable for Iso8601<CONFIG>
impl<const CONFIG: u128> Parsable for Iso8601<CONFIG>
impl<const CONFIG: u128> StructuralPartialEq for Iso8601<CONFIG>
Auto Trait Implementations§
impl<const CONFIG: u128> Freeze for Iso8601<CONFIG>
impl<const CONFIG: u128> RefUnwindSafe for Iso8601<CONFIG>
impl<const CONFIG: u128> Send for Iso8601<CONFIG>
impl<const CONFIG: u128> Sync for Iso8601<CONFIG>
impl<const CONFIG: u128> Unpin for Iso8601<CONFIG>
impl<const CONFIG: u128> UnwindSafe for Iso8601<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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.