[−][src]Struct email::rfc822::Rfc822DateParser
Parser for RFC822 style dates, as defined by Section 5.
Note that this also supports the additions as specified in RFC5322 Section 3.3 while still being backward compatible. [unstable]
Methods
impl<'s> Rfc822DateParser<'s>
[src]
pub fn new(s: &'s str) -> Rfc822DateParser<'s>
[src]
[unstable]
pub fn consume_datetime(&mut self) -> ParsingResult<DateTime<FixedOffset>>
[src]
Consume a DateTime from the input.
If successful, returns a DateTime with a fixed offset based on the timezone parsed. You may wish to deal with this in UTC, in which case you may want something like
use email::rfc822::Rfc822DateParser; use chrono::Utc; let mut p = Rfc822DateParser::new("Thu, 18 Dec 2014 21:07:22 +0100"); let d = p.consume_datetime().unwrap(); let as_utc = d.with_timezone(&Utc); assert_eq!(d, as_utc);
[unstable]
Auto Trait Implementations
impl<'s> RefUnwindSafe for Rfc822DateParser<'s>
impl<'s> Send for Rfc822DateParser<'s>
impl<'s> Sync for Rfc822DateParser<'s>
impl<'s> Unpin for Rfc822DateParser<'s>
impl<'s> UnwindSafe for Rfc822DateParser<'s>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,