Struct neon::types::JsDate [−][src]
#[repr(C)]pub struct JsDate(_);
This is supported on crate feature
napi-5
only.Expand description
A JavaScript Date object
Implementations
The smallest possible Date value, defined by ECMAScript. See https://www.ecma-international.org/ecma-262/5.1/#sec-15.7.3.3
The largest possible Date value, defined by ECMAScript. See https://www.ecma-international.org/ecma-262/5.1/#sec-15.7.3.2
Creates a new Date. It errors when value
is outside the range of valid JavaScript Date values. When value
is NaN
, the operation will succeed but with an invalid Date
Creates a new Date with lossy conversion for out of bounds Date values. Out of bounds values will be treated as NaN
Gets the Date’s value. An invalid Date will return std::f64::NaN
Trait Implementations
fn get<'a, C: Context<'a>, K: PropertyKey>(
self,
cx: &mut C,
key: K
) -> NeonResult<Handle<'a, JsValue>>
This is supported on crate feature
napi-6
only.fn set<'a, C: Context<'a>, K: PropertyKey, W: Value>(
self,
cx: &mut C,
key: K,
val: Handle<'_, W>
) -> NeonResult<bool>
Auto Trait Implementations
impl RefUnwindSafe for JsDate
impl UnwindSafe for JsDate
Blanket Implementations
Mutably borrows from an owned value. Read more