Be aware: Foundation will NEVER ask for your seed words, device PIN, or call you unexpectedly. If anyone does, it's a scam.

Struct

DateTime

pub struct DateTime {
    pub date: Date,
    pub time: Time,
}

Fields

date: Datetime: Time

Trait Implementations

impl Archive for DateTime
where Date: Archive, Time: Archive,

const COPY_OPTIMIZATION: CopyOptimization<Self>

An optimization flag that allows the bytes of this type to be copied directly to a writer instead of calling serialize. Read more

type Archived = ArchivedDateTime

The archived representation of this type. Read more

type Resolver = DateTimeResolver

The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type.

fn resolve(&self, resolver: Self::Resolver, out: Place<Self::Archived>)

Creates the archived version of this value at the given position and writes it to the given output. Read more

impl Clone for DateTime

fn clone(&self) -> DateTime

Returns a duplicate of the value. Read more
1.0.0

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

impl Debug for DateTime

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

impl<__D: Fallible + ?Sized> Deserialize<DateTime, __D> for Archived<DateTime>
where Date: Archive, <Date as Archive>::Archived: Deserialize<Date, __D>, Time: Archive, <Time as Archive>::Archived: Deserialize<Time, __D>,

fn deserialize( &self, deserializer: &mut __D, ) -> Result<DateTime, <__D as Fallible>::Error>

Deserializes using the given deserializer

impl Ord for DateTime

fn cmp(&self, other: &Self) -> Ordering

This method returns an [Ordering] between self and other. Read more
1.21.0

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more

impl PartialEq for DateTime

fn eq(&self, other: &DateTime) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

impl PartialOrd for DateTime

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl<__S: Fallible + ?Sized> Serialize<__S> for DateTime
where Date: Serialize<__S>, Time: Serialize<__S>,

fn serialize( &self, serializer: &mut __S, ) -> Result<<Self as Archive>::Resolver, <__S as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.

impl Copy for DateTime

impl Eq for DateTime

impl StructuralPartialEq for DateTime

Auto Trait Implementations

impl Freeze for DateTime

impl RefUnwindSafe for DateTime

impl Send for DateTime

impl Sync for DateTime

impl Unpin for DateTime

impl UnsafeUnpin for DateTime

impl UnwindSafe for DateTime