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

Checks if the Date’s value is valid. A Date is valid if its value is between JsDate::MIN_VALUE and JsDate::MAX_VALUE or if it is NaN

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This is supported on crate feature napi-6 only.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.