Struct imap_codec::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>) -> DateTime
pub fn unvalidated(value: DateTime<FixedOffset>) -> DateTime
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<DateTime, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<DateTime, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read more§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<DateTime, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<DateTime, <__D as Deserializer<'de>>::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§fn into_static(self) -> <DateTime as IntoBoundedStatic>::Static
fn into_static(self) -> <DateTime as IntoBoundedStatic>::Static
Convert an owned
T
into an owned T
such that T: 'static
.source§impl PartialEq<DateTime> for DateTime
impl PartialEq<DateTime> for DateTime
source§impl Serialize for DateTime
impl Serialize for DateTime
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
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