Struct imap_types::datetime::DateTime
source · pub struct DateTime(_);
Implementations§
source§impl DateTime
impl DateTime
pub fn validate(value: &DateTime<FixedOffset>) -> Result<(), DateTimeError>
sourcepub fn unvalidated(value: DateTime<FixedOffset>) -> Self
Available on crate feature unvalidated
only.
pub fn unvalidated(value: DateTime<FixedOffset>) -> Self
unvalidated
only.Constructs a date time without validation.
Warning: IMAP conformance
The caller must ensure that value
is valid according to Self::validate
. Failing to do
so may create invalid/unparsable IMAP messages, or even produce unintended protocol flows.
Do not call this constructor with untrusted data.
Trait Implementations§
source§impl<'a> Arbitrary<'a> for DateTime
impl<'a> Arbitrary<'a> for DateTime
source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moresource§impl AsRef<DateTime<FixedOffset>> for DateTime
impl AsRef<DateTime<FixedOffset>> for DateTime
source§fn as_ref(&self) -> &DateTime<FixedOffset>
fn as_ref(&self) -> &DateTime<FixedOffset>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<'de> Deserialize<'de> for DateTime
impl<'de> Deserialize<'de> for DateTime
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IntoBoundedStatic for DateTime
impl IntoBoundedStatic for DateTime
source§impl PartialEq<DateTime> for DateTime
impl PartialEq<DateTime> for DateTime
source§impl ToBoundedStatic for DateTime
impl ToBoundedStatic for DateTime
source§impl TryFrom<DateTime<FixedOffset>> for DateTime
impl TryFrom<DateTime<FixedOffset>> for DateTime
§type Error = DateTimeError
type Error = DateTimeError
The type returned in the event of a conversion error.
impl Eq for DateTime
impl StructuralEq for DateTime
impl StructuralPartialEq for DateTime
Auto Trait Implementations§
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
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