#[non_exhaustive]pub enum RelativeTimeFormatUnit {
Show 16 variants
Year = 0,
Years = 1,
Quarter = 2,
Quarters = 3,
Month = 4,
Months = 5,
Week = 6,
Weeks = 7,
Day = 8,
Days = 9,
Hour = 10,
Hours = 11,
Minute = 12,
Minutes = 13,
Second = 14,
Seconds = 15,
}Expand description
Unit for RelativeTimeFormat.format().
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Year = 0
Years = 1
Quarter = 2
Quarters = 3
Month = 4
Months = 5
Week = 6
Weeks = 7
Day = 8
Days = 9
Hour = 10
Hours = 11
Minute = 12
Minutes = 13
Second = 14
Seconds = 15
Implementations§
Source§impl RelativeTimeFormatUnit
impl RelativeTimeFormatUnit
pub fn from_js_value(obj: &JsValue) -> Option<RelativeTimeFormatUnit>
Trait Implementations§
Source§impl Clone for RelativeTimeFormatUnit
impl Clone for RelativeTimeFormatUnit
Source§fn clone(&self) -> RelativeTimeFormatUnit
fn clone(&self) -> RelativeTimeFormatUnit
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RelativeTimeFormatUnit
impl Debug for RelativeTimeFormatUnit
Source§impl From<RelativeTimeFormatUnit> for JsValue
impl From<RelativeTimeFormatUnit> for JsValue
Source§fn from(val: RelativeTimeFormatUnit) -> Self
fn from(val: RelativeTimeFormatUnit) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for RelativeTimeFormatUnit
impl FromWasmAbi for RelativeTimeFormatUnit
Source§impl IntoWasmAbi for RelativeTimeFormatUnit
impl IntoWasmAbi for RelativeTimeFormatUnit
Source§impl PartialEq for RelativeTimeFormatUnit
impl PartialEq for RelativeTimeFormatUnit
impl Copy for RelativeTimeFormatUnit
impl Eq for RelativeTimeFormatUnit
impl StructuralPartialEq for RelativeTimeFormatUnit
Auto Trait Implementations§
impl Freeze for RelativeTimeFormatUnit
impl RefUnwindSafe for RelativeTimeFormatUnit
impl Send for RelativeTimeFormatUnit
impl Sync for RelativeTimeFormatUnit
impl Unpin for RelativeTimeFormatUnit
impl UnsafeUnpin for RelativeTimeFormatUnit
impl UnwindSafe for RelativeTimeFormatUnit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.