Struct IsoWeek
pub struct IsoWeek { /* private fields */ }
ISO 8601 week.
This type, combined with Weekday,
constitutes the ISO 8601 week date.
One can retrieve this type from the existing Datelike types
via the Datelike::iso_week method.
Implementations
impl IsoWeek
const fn year(&self) -> i32Returns the year number for this ISO week.
Example
use ; let d = from_isoywd_opt.unwrap; assert_eq!;This year number might not match the calendar year number. Continuing the example...
# use ; # let d = from_isoywd_opt.unwrap; assert_eq!; assert_eq!;const fn week(&self) -> u32Returns the ISO week number starting from 1.
The return value ranges from 1 to 53. (The last week of year differs by years.)
Example
use ; let d = from_isoywd_opt.unwrap; assert_eq!;const fn week0(&self) -> u32Returns the ISO week number starting from 0.
The return value ranges from 0 to 52. (The last week of year differs by years.)
Example
use ; let d = from_isoywd_opt.unwrap; assert_eq!;
Trait Implementations
impl Clone for IsoWeek
fn clone(&self) -> IsoWeek
impl Copy for IsoWeek
impl Debug for IsoWeek
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for IsoWeek
impl Hash for IsoWeek
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for IsoWeek
fn cmp(&self, other: &IsoWeek) -> Ordering
impl PartialEq for IsoWeek
fn eq(&self, other: &IsoWeek) -> bool
impl PartialOrd for IsoWeek
fn partial_cmp(&self, other: &IsoWeek) -> Option<Ordering>
impl StructuralPartialEq for IsoWeek
Auto Trait Implementations
impl Freeze for IsoWeek
impl RefUnwindSafe for IsoWeek
impl Send for IsoWeek
impl Sync for IsoWeek
impl Unpin for IsoWeek
impl UnsafeUnpin for IsoWeek
impl UnwindSafe for IsoWeek
Blanket Implementations
impl<T> Any for IsoWeek
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for IsoWeek
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for IsoWeek
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for IsoWeek
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for IsoWeek
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for IsoWeek
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for IsoWeek
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for IsoWeek
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 IsoWeek
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>