Skip to main content

Day

Struct Day 

Source
pub struct Day(/* private fields */);
Expand description

The supported range of “day of month.”

While the maximum value is 31, the actual maximum depends on the specific month. The smallest possible maximum for any month is 28 for February.

Implementations§

Source§

impl Day

Source

pub const MIN: i8 = <Day as Bounds>::MIN

Source

pub const MAX: i8 = <Day as Bounds>::MAX

Source

pub const LEN: i128

Source

pub const fn error() -> BoundsError

Source

pub fn check(n: impl Into<i64>) -> Result<i8, BoundsError>

Source

pub const fn checkc(n: i64) -> Result<i8, BoundsError>

Source

pub const fn checked_add(n1: i8, n2: i8) -> Result<i8, BoundsError>

Source

pub fn checked_mul(n1: i8, n2: i8) -> Result<i8, BoundsError>

Trait Implementations§

Source§

impl Bounds for Day

Source§

const WHAT: &'static str = "day"

A short human readable description of the values represented by these bounds. This is used in error messages.
Source§

const MIN: Self::Primitive = 1

The minimum boundary value.
Source§

const MAX: Self::Primitive = 31

The maximum boundary value.
Source§

type Primitive = i8

The primitive integer representation for this boundary type. Read more
Source§

type Error = BoundsError

The error type returned when a value is considered out of range for this particular implementation. Read more
Source§

fn error() -> BoundsError

Create an error when a value is outside the bounds for this type.
Source§

fn check(n: impl Into<i64>) -> Result<Self::Primitive, Self::Error>

Converts the 64-bit integer provided into the primitive representation of these bounds. Read more
Source§

fn check_self(n: Self::Primitive) -> Result<Self::Primitive, Self::Error>

Checks whether the given integer, in the same primitive representation as this boundary type, is in bounds. Read more
Source§

fn checked_add( n1: Self::Primitive, n2: Self::Primitive, ) -> Result<Self::Primitive, Self::Error>

Performs checked addition using this boundary type’s primitive representation. Read more
Source§

fn checked_mul( n1: Self::Primitive, n2: Self::Primitive, ) -> Result<Self::Primitive, Self::Error>

Performs checked multiplication using this boundary type’s primitive representation. Read more
Source§

impl Eq for Day

Source§

impl PartialEq for Day

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Day

Auto Trait Implementations§

§

impl Freeze for Day

§

impl RefUnwindSafe for Day

§

impl Send for Day

§

impl Sync for Day

§

impl Unpin for Day

§

impl UnsafeUnpin for Day

§

impl UnwindSafe for Day

Blanket Implementations§

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> 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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.