[−][src]Struct picky_asn1::date::Date
A basic Date struct.
Implementations
impl<TR: TimeRepr> Date<TR>
[src]
pub unsafe fn new_unchecked(
year: u16,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> Date<TR>
[src]
year: u16,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> Date<TR>
Create a new Date without validation.
Safety
You have to make sure you're not building an invalid date.
pub fn new(
year: u16,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> Option<Date<TR>>
[src]
year: u16,
month: u8,
day: u8,
hour: u8,
minute: u8,
second: u8
) -> Option<Date<TR>>
pub fn year(&self) -> u16
[src]
pub fn month(&self) -> u8
[src]
pub fn day(&self) -> u8
[src]
pub fn hour(&self) -> u8
[src]
pub fn minute(&self) -> u8
[src]
pub fn second(&self) -> u8
[src]
Trait Implementations
impl<TR: Clone + TimeRepr> Clone for Date<TR>
[src]
impl<TR: Debug + TimeRepr> Debug for Date<TR>
[src]
impl<'de, TR: TimeRepr> Deserialize<'de> for Date<TR>
[src]
fn deserialize<D>(
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl<TR: Eq + TimeRepr> Eq for Date<TR>
[src]
impl From<Date<GeneralizedTimeRepr>> for GeneralizedTimeAsn1
[src]
fn from(wrapped: GeneralizedTime) -> Self
[src]
impl From<Date<UTCTimeRepr>> for UTCTimeAsn1
[src]
impl<TR: Hash + TimeRepr> Hash for Date<TR>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Into<Date<GeneralizedTimeRepr>> for GeneralizedTimeAsn1
[src]
fn into(self) -> GeneralizedTime
[src]
impl Into<Date<UTCTimeRepr>> for UTCTimeAsn1
[src]
impl<TR: Ord + TimeRepr> Ord for Date<TR>
[src]
fn cmp(&self, other: &Date<TR>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Date<GeneralizedTimeRepr>> for GeneralizedTimeAsn1
[src]
fn eq(&self, other: &GeneralizedTime) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<TR: PartialEq + TimeRepr> PartialEq<Date<TR>> for Date<TR>
[src]
impl PartialEq<Date<UTCTimeRepr>> for UTCTimeAsn1
[src]
impl<TR: PartialOrd + TimeRepr> PartialOrd<Date<TR>> for Date<TR>
[src]
fn partial_cmp(&self, other: &Date<TR>) -> Option<Ordering>
[src]
fn lt(&self, other: &Date<TR>) -> bool
[src]
fn le(&self, other: &Date<TR>) -> bool
[src]
fn gt(&self, other: &Date<TR>) -> bool
[src]
fn ge(&self, other: &Date<TR>) -> bool
[src]
impl<TR: TimeRepr> Serialize for Date<TR>
[src]
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl<TR: TimeRepr> StructuralEq for Date<TR>
[src]
impl<TR: TimeRepr> StructuralPartialEq for Date<TR>
[src]
Auto Trait Implementations
impl<TR> RefUnwindSafe for Date<TR> where
TR: RefUnwindSafe,
TR: RefUnwindSafe,
impl<TR> Send for Date<TR> where
TR: Send,
TR: Send,
impl<TR> Sync for Date<TR> where
TR: Sync,
TR: Sync,
impl<TR> Unpin for Date<TR> where
TR: Unpin,
TR: Unpin,
impl<TR> UnwindSafe for Date<TR> where
TR: UnwindSafe,
TR: UnwindSafe,
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,