#[non_exhaustive]pub enum DateFormat {
ImfFixdate,
Rfc850,
Asctime,
}Expand description
The HTTP-date format a value was written in.
§Examples
use parse_net::{DateFormat, HttpDate};
let (_, fmt) = HttpDate::parse_detailed(b"Sun Nov 6 08:49:37 1994", 0)?;
assert_eq!(fmt, DateFormat::Asctime);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ImfFixdate
Sun, 06 Nov 1994 08:49:37 GMT, the only format senders may generate.
Rfc850
Sunday, 06-Nov-94 08:49:37 GMT (obsolete).
Asctime
Sun Nov 6 08:49:37 1994 (obsolete).
Trait Implementations§
Source§impl Clone for DateFormat
impl Clone for DateFormat
impl Copy for DateFormat
Source§impl Debug for DateFormat
impl Debug for DateFormat
impl Eq for DateFormat
Source§impl Hash for DateFormat
impl Hash for DateFormat
Source§impl PartialEq for DateFormat
impl PartialEq for DateFormat
impl StructuralPartialEq for DateFormat
Auto Trait Implementations§
impl Forget for DateFormat
impl Freeze for DateFormat
impl RefUnwindSafe for DateFormat
impl Send for DateFormat
impl Sync for DateFormat
impl Unpin for DateFormat
impl UnsafeUnpin for DateFormat
impl UnwindSafe for DateFormat
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