Struct time::format_description::well_known::Rfc2822
source · [−]pub struct Rfc2822;
Expand description
The format described in RFC 2822.
Example: Fri, 21 Nov 1997 09:55:06 -0600
Examples
assert_eq!(
OffsetDateTime::parse("Sat, 12 Jun 1993 13:25:19 GMT", &Rfc2822)?,
datetime!(1993-06-12 13:25:19 +00:00)
);
Runassert_eq!(
datetime!(1997-11-21 09:55:06 -06:00).format(&Rfc2822)?,
"Fri, 21 Nov 1997 09:55:06 -0600"
);
RunTrait Implementations
impl Copy for Rfc2822
impl Eq for Rfc2822
impl Formattable for Rfc2822
impl StructuralEq for Rfc2822
impl StructuralPartialEq for Rfc2822
Auto Trait Implementations
impl RefUnwindSafe for Rfc2822
impl Send for Rfc2822
impl Sync for Rfc2822
impl Unpin for Rfc2822
impl UnwindSafe for Rfc2822
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more