Struct Duration
#[repr(transparent)]
pub struct Duration { /* private fields */ }
A duration object used as input to Intl.DurationFormat.format().
Implementations
impl Duration
fn months(&self) -> Option<f64>
impl Duration
fn set_weeks(&self, value: f64)
impl Duration
fn hours(&self) -> Option<f64>
impl Duration
fn set_minutes(&self, value: f64)
impl Duration
fn milliseconds(&self) -> Option<f64>
impl Duration
fn set_microseconds(&self, value: f64)
impl Duration
fn new() -> Duration
impl Duration
fn years(&self) -> Option<f64>
impl Duration
fn set_months(&self, value: f64)
impl Duration
fn days(&self) -> Option<f64>
impl Duration
fn set_hours(&self, value: f64)
impl Duration
fn seconds(&self) -> Option<f64>
impl Duration
fn set_milliseconds(&self, value: f64)
impl Duration
fn nanoseconds(&self) -> Option<f64>
impl Duration
fn set_years(&self, value: f64)
impl Duration
fn weeks(&self) -> Option<f64>
impl Duration
fn set_days(&self, value: f64)
impl Duration
fn minutes(&self) -> Option<f64>
impl Duration
fn set_seconds(&self, value: f64)
impl Duration
fn microseconds(&self) -> Option<f64>
impl Duration
fn set_nanoseconds(&self, value: f64)
Trait Implementations
impl AsRef<Duration> for Duration
fn as_ref(&self) -> &Duration
impl AsRef<JsValue> for Duration
fn as_ref(&self) -> &JsValue
impl AsRef<Object> for Duration
fn as_ref(&self) -> &Object
impl Clone for Duration
fn clone(&self) -> Self
impl Debug for Duration
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for Duration
fn default() -> Self
impl Deref for Duration
type Target = Object;fn deref(&self) -> &Object
impl ErasableGeneric for Duration
type Repr = JsValue;
impl From<JsValue> for Duration
fn from(obj: JsValue) -> Self
impl FromWasmAbi for Duration
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl IntoJsGeneric for Duration
where
Duration: JsGeneric,
type JsCanon = Duration;fn to_js(self) -> Duration
impl IntoWasmAbi for Duration
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl JsCast for Duration
fn instanceof(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl LongRefFromWasmAbi for Duration
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = Duration;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl OptionFromWasmAbi for Duration
fn is_none(abi: &Self::Abi) -> bool
impl OptionIntoWasmAbi for Duration
fn none() -> Self::Abi
impl Promising for Duration
type Resolution = Duration;
impl RefFromWasmAbi for Duration
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<Duration>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl UpcastFrom<Duration> for Duration
impl WasmDescribe for Duration
fn describe()