Struct Months

pub struct Months(/* private field */);

A duration in calendar months

Implementations

impl Months

const fn new(num: u32) -> Self

Construct a new Months from a number of months

const fn as_u32(&self) -> u32

Returns the total number of months in the Months instance.

Trait Implementations

impl Clone for Months

fn clone(&self) -> Self

impl Copy for Months

impl Debug for Months

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

impl Eq for Months

impl Hash for Months

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

impl Ord for Months

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

impl PartialEq for Months

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

impl PartialOrd for Months

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

impl StructuralPartialEq for Months

Auto Trait Implementations

impl Freeze for Months

impl RefUnwindSafe for Months

impl Send for Months

impl Sync for Months

impl Unpin for Months

impl UnsafeUnpin for Months

impl UnwindSafe for Months

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> CloneToUninit for Months where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for Months

fn from(t: T) -> T

Returns the argument unchanged.

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

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

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

fn into(self) -> U

Calls U::from(self).

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

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

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

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