Struct time::format_description::well_known::rfc3339::Rfc3339
source · pub struct Rfc3339;
Expand description
The format described in RFC 3339.
Format example: 1985-04-12T23:20:50.52Z
§Examples
assert_eq!(
OffsetDateTime::parse("1985-04-12T23:20:50.52Z", &Rfc3339)?,
datetime!(1985-04-12 23:20:50.52 +00:00)
);
Runassert_eq!(
datetime!(1985-04-12 23:20:50.52 +00:00).format(&Rfc3339)?,
"1985-04-12T23:20:50.52Z"
);
RunTrait Implementations§
source§impl PartialEq for Rfc3339
impl PartialEq for Rfc3339
source§impl Sealed for Rfc3339
impl Sealed for Rfc3339
source§fn parse_offset_date_time(&self, input: &[u8]) -> Result<OffsetDateTime, Parse>
fn parse_offset_date_time(&self, input: &[u8]) -> Result<OffsetDateTime, Parse>
Parse a
OffsetDateTime
from the format description.source§fn parse_date(&self, input: &[u8]) -> Result<Date, Parse>
fn parse_date(&self, input: &[u8]) -> Result<Date, Parse>
Parse a
Date
from the format description.source§fn parse_time(&self, input: &[u8]) -> Result<Time, Parse>
fn parse_time(&self, input: &[u8]) -> Result<Time, Parse>
Parse a
Time
from the format description.source§fn parse_offset(&self, input: &[u8]) -> Result<UtcOffset, Parse>
fn parse_offset(&self, input: &[u8]) -> Result<UtcOffset, Parse>
Parse a
UtcOffset
from the format description.source§fn parse_primitive_date_time(
&self,
input: &[u8],
) -> Result<PrimitiveDateTime, Parse>
fn parse_primitive_date_time( &self, input: &[u8], ) -> Result<PrimitiveDateTime, Parse>
Parse a
PrimitiveDateTime
from the format description.source§impl Sealed for Rfc3339
impl Sealed for Rfc3339
impl Copy for Rfc3339
impl Eq for Rfc3339
impl Formattable for Rfc3339
impl Parsable for Rfc3339
impl StructuralPartialEq for Rfc3339
Auto Trait Implementations§
impl Freeze for Rfc3339
impl RefUnwindSafe for Rfc3339
impl Send for Rfc3339
impl Sync for Rfc3339
impl Unpin for Rfc3339
impl UnwindSafe for Rfc3339
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