Struct imap_codec::datetime::NaiveDate
source · pub struct NaiveDate(_);
Implementations§
source§impl NaiveDate
impl NaiveDate
pub fn validate(value: &NaiveDate) -> Result<(), NaiveDateError>
sourcepub fn unvalidated(value: NaiveDate) -> NaiveDate
pub fn unvalidated(value: NaiveDate) -> NaiveDate
Constructs a naive date 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 NaiveDate
impl<'a> Arbitrary<'a> for NaiveDate
source§fn arbitrary(u: &mut Unstructured<'a>) -> Result<NaiveDate, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<NaiveDate, 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<'de> Deserialize<'de> for NaiveDate
impl<'de> Deserialize<'de> for NaiveDate
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<NaiveDate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<NaiveDate, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl IntoBoundedStatic for NaiveDate
impl IntoBoundedStatic for NaiveDate
source§fn into_static(self) -> <NaiveDate as IntoBoundedStatic>::Static
fn into_static(self) -> <NaiveDate as IntoBoundedStatic>::Static
Convert an owned
T
into an owned T
such that T: 'static
.source§impl PartialEq<NaiveDate> for NaiveDate
impl PartialEq<NaiveDate> for NaiveDate
source§impl Serialize for NaiveDate
impl Serialize for NaiveDate
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 NaiveDate
impl ToBoundedStatic for NaiveDate
impl Eq for NaiveDate
impl StructuralEq for NaiveDate
impl StructuralPartialEq for NaiveDate
Auto Trait Implementations§
impl RefUnwindSafe for NaiveDate
impl Send for NaiveDate
impl Sync for NaiveDate
impl Unpin for NaiveDate
impl UnwindSafe for NaiveDate
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