Struct NthWeekdayOfMonth

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

The supported range of values for getting the "nth weekday of a month" from a particular date.

Note that 0 is also invalid, but this is not expressed by this single contiguous range. Note also that 5 or -5 can be invalid if the provided month does not contain a 5th instance of the weekday provided by the caller.

Implementations

impl NthWeekdayOfMonth

const MIN: i8 = <NthWeekdayOfMonth as Bounds>::MIN;
const MAX: i8 = <NthWeekdayOfMonth as Bounds>::MAX;
const LEN: i128 = _;
const fn error() -> BoundsError
fn check(n: impl Into<i64>) -> Result<i8, BoundsError>
const fn checkc(n: i64) -> Result<i8, BoundsError>
const fn checked_add(n1: i8, n2: i8) -> Result<i8, BoundsError>
fn checked_mul(n1: i8, n2: i8) -> Result<i8, BoundsError>

Trait Implementations

impl Bounds for NthWeekdayOfMonth

const WHAT: &'static str = "nth weekday of month";
const MIN: Self::Primitive = -5;
const MAX: Self::Primitive = 5;
type Primitive = i8;
type Error = BoundsError;
fn error() -> BoundsError

impl Eq for NthWeekdayOfMonth

impl PartialEq for NthWeekdayOfMonth

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

impl StructuralPartialEq for NthWeekdayOfMonth

Auto Trait Implementations

impl Freeze for NthWeekdayOfMonth

impl RefUnwindSafe for NthWeekdayOfMonth

impl Send for NthWeekdayOfMonth

impl Sync for NthWeekdayOfMonth

impl Unpin for NthWeekdayOfMonth

impl UnsafeUnpin for NthWeekdayOfMonth

impl UnwindSafe for NthWeekdayOfMonth

Blanket Implementations

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

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

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

impl<T> From<T> for NthWeekdayOfMonth

fn from(t: T) -> T

Returns the argument unchanged.

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

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

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

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