Struct devela::all::YearSecSplit

source ·
pub struct YearSecSplit<Y, MO, D, H, M, S> {
    pub y: Y,
    pub mo: MO,
    pub d: D,
    pub h: H,
    pub m: M,
    pub s: S,
}
Expand description

A time split in seconds, minutes, hours, days, months and years.

Fields§

§y: Y

Years.

§mo: MO

Months.

§d: D

Days.

§h: H

Hours.

§m: M

Minutes.

§s: S

Seconds.

Implementations§

source§

impl<Y, MO, D, H, M, S> YearSecSplit<Y, MO, D, H, M, S>

source

pub fn as_tuple(self) -> (Y, MO, D, H, M, S)

Returns the fields as a tuple.

source§

impl<Y: Copy, MO: Copy, D: Copy, H: Copy, M: Copy, S: Copy> YearSecSplit<Y, MO, D, H, M, S>

source

pub const fn to_tuple(self) -> (Y, MO, D, H, M, S)

Returns the fields as a tuple in compile-time.

source§

impl<T> YearSecSplit<T, T, T, T, T, T>

source

pub fn as_array(self) -> [T; 6]

Returns the fields as an array.

source§

impl<T: Copy> YearSecSplit<T, T, T, T, T, T>

source

pub const fn to_array(self) -> [T; 6]

Returns the fields as an array in compile-time.

Trait Implementations§

source§

impl<Y: Clone, MO: Clone, D: Clone, H: Clone, M: Clone, S: Clone> Clone for YearSecSplit<Y, MO, D, H, M, S>

source§

fn clone(&self) -> YearSecSplit<Y, MO, D, H, M, S>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<Y: Debug, MO: Debug, D: Debug, H: Debug, M: Debug, S: Debug> Debug for YearSecSplit<Y, MO, D, H, M, S>

source§

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

Formats the value using the given formatter. Read more
source§

impl<Y: Default, MO: Default, D: Default, H: Default, M: Default, S: Default> Default for YearSecSplit<Y, MO, D, H, M, S>

source§

fn default() -> YearSecSplit<Y, MO, D, H, M, S>

Returns the “default value” for a type. Read more
source§

impl<Y: Hash, MO: Hash, D: Hash, H: Hash, M: Hash, S: Hash> Hash for YearSecSplit<Y, MO, D, H, M, S>

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<Y: Ord, MO: Ord, D: Ord, H: Ord, M: Ord, S: Ord> Ord for YearSecSplit<Y, MO, D, H, M, S>

source§

fn cmp(&self, other: &YearSecSplit<Y, MO, D, H, M, S>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

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

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

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

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

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

Restrict a value to a certain interval. Read more
source§

impl<Y: PartialEq, MO: PartialEq, D: PartialEq, H: PartialEq, M: PartialEq, S: PartialEq> PartialEq for YearSecSplit<Y, MO, D, H, M, S>

source§

fn eq(&self, other: &YearSecSplit<Y, MO, D, H, M, S>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<Y: PartialOrd, MO: PartialOrd, D: PartialOrd, H: PartialOrd, M: PartialOrd, S: PartialOrd> PartialOrd for YearSecSplit<Y, MO, D, H, M, S>

source§

fn partial_cmp( &self, other: &YearSecSplit<Y, MO, D, H, M, S> ) -> Option<Ordering>

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

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<Y: Copy, MO: Copy, D: Copy, H: Copy, M: Copy, S: Copy> Copy for YearSecSplit<Y, MO, D, H, M, S>

source§

impl<Y: Eq, MO: Eq, D: Eq, H: Eq, M: Eq, S: Eq> Eq for YearSecSplit<Y, MO, D, H, M, S>

source§

impl<Y, MO, D, H, M, S> StructuralPartialEq for YearSecSplit<Y, MO, D, H, M, S>

Auto Trait Implementations§

§

impl<Y, MO, D, H, M, S> Freeze for YearSecSplit<Y, MO, D, H, M, S>
where D: Freeze, H: Freeze, M: Freeze, MO: Freeze, S: Freeze, Y: Freeze,

§

impl<Y, MO, D, H, M, S> RefUnwindSafe for YearSecSplit<Y, MO, D, H, M, S>

§

impl<Y, MO, D, H, M, S> Send for YearSecSplit<Y, MO, D, H, M, S>
where D: Send, H: Send, M: Send, MO: Send, S: Send, Y: Send,

§

impl<Y, MO, D, H, M, S> Sync for YearSecSplit<Y, MO, D, H, M, S>
where D: Sync, H: Sync, M: Sync, MO: Sync, S: Sync, Y: Sync,

§

impl<Y, MO, D, H, M, S> Unpin for YearSecSplit<Y, MO, D, H, M, S>
where D: Unpin, H: Unpin, M: Unpin, MO: Unpin, S: Unpin, Y: Unpin,

§

impl<Y, MO, D, H, M, S> UnwindSafe for YearSecSplit<Y, MO, D, H, M, S>

Blanket Implementations§

source§

impl<T> Also for T

source§

fn also_mut<F: FnOnce(&mut Self)>(self, f: F) -> Self

Applies a function which takes the parameter by exclusive reference, and then returns the (possibly) modified owned value. Read more
source§

fn also_ref<F: FnOnce(&Self)>(self, f: F) -> Self

Applies a function which takes the parameter by shared reference, and then returns the (possibly) modified owned value. Read more
source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T, Res> Apply<Res> for T
where T: ?Sized,

source§

fn apply<F: FnOnce(Self) -> Res>(self, f: F) -> Res
where Self: Sized,

Apply a function which takes the parameter by value.
source§

fn apply_ref<F: FnOnce(&Self) -> Res>(&self, f: F) -> Res

Apply a function which takes the parameter by shared reference.
source§

fn apply_mut<F: FnOnce(&mut Self) -> Res>(&mut self, f: F) -> Res

Apply a function which takes the parameter by exclusive reference.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> ByteSize for T

source§

const BYTE_ALIGN: usize = _

The alignment of this type in bytes.
source§

const BYTE_SIZE: usize = _

The size of this type in bytes.
source§

const PTR_SIZE: usize = 8usize

The size of a pointer in bytes, for the current platform.
source§

fn byte_align(&self) -> usize

Returns the alignment of this type in bytes.
source§

fn byte_size(&self) -> usize

Returns the size of this type in bytes. Read more
source§

fn ptr_size_ratio(&self) -> [usize; 2]

Returns the size ratio between PTR_SIZE and BYTE_SIZE. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<T> ExtAny for T
where T: Any,

source§

fn type_of(&self) -> TypeId

Returns the TypeId of self. Read more
source§

fn type_name(&self) -> &'static str

Returns the type name of self. Read more
source§

fn type_is<T: 'static>(&self) -> bool

Returns true if Self is of type T. Read more
source§

fn as_any_ref(&self) -> &dyn Any
where Self: Sized,

Upcasts &self as &dyn Any. Read more
source§

fn as_any_mut(&mut self) -> &mut dyn Any
where Self: Sized,

Upcasts &mut self as &mut dyn Any. Read more
source§

fn as_any_box(self: Box<Self>) -> Box<dyn Any>
where Self: Sized,

Upcasts Box<self> as Box<dyn Any>. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Mem for T
where T: ?Sized,

source§

const NEEDS_DROP: bool = _

Whether dropping values of this type matters.
source§

fn mem_needs_drop(&self) -> bool

Returns true if dropping values of this type matters.
source§

fn mem_drop(self)
where Self: Sized,

Drops self by running its destructor.
source§

fn mem_forget(self)
where Self: Sized,

Forgets about self without running its destructor.
source§

fn mem_replace(&mut self, other: Self) -> Self
where Self: Sized,

Replaces self with other, returning the previous value of self.
source§

fn mem_take(&mut self) -> Self
where Self: Default,

Replaces self with its default value, returning the previous value of self.
source§

fn mem_swap(&mut self, other: &mut Self)
where Self: Sized,

Swaps the value of self and other without deinitializing either one.
source§

fn mem_as_bytes(&self) -> &[u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &[u8]. Read more
source§

fn mem_as_bytes_mut(&mut self) -> &mut [u8]
where Self: Sync + Unpin,

Available on crate feature unsafe_slice only.
View a Sync + Unpin self as &mut [u8].
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.