pub struct PlainDateTime { /* private fields */ }Expand description
A Temporal.PlainDateTime represents a calendar date and wall-clock time, with
a precision in nanoseconds, and without any time zone.
Implementations§
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn new(
iso_year: i32,
iso_month: u32,
iso_day: u32,
) -> Result<PlainDateTime, RangeError>
pub fn new( iso_year: i32, iso_month: u32, iso_day: u32, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime() constructor creates Temporal.PlainDateTime objects.
Omitted fields default to zero, or to the ISO 8601 calendar.
§Errors
Throws a RangeError if any field is out of range or calendar is not a
supported calendar identifier.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn new_with_hour(
iso_year: i32,
iso_month: u32,
iso_day: u32,
hour: u32,
) -> Result<PlainDateTime, RangeError>
pub fn new_with_hour( iso_year: i32, iso_month: u32, iso_day: u32, hour: u32, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime() constructor; see PlainDateTime::new for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn new_with_hour_and_minute(
iso_year: i32,
iso_month: u32,
iso_day: u32,
hour: u32,
minute: u32,
) -> Result<PlainDateTime, RangeError>
pub fn new_with_hour_and_minute( iso_year: i32, iso_month: u32, iso_day: u32, hour: u32, minute: u32, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime() constructor; see PlainDateTime::new for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn new_with_hour_and_minute_and_second(
iso_year: i32,
iso_month: u32,
iso_day: u32,
hour: u32,
minute: u32,
second: u32,
) -> Result<PlainDateTime, RangeError>
pub fn new_with_hour_and_minute_and_second( iso_year: i32, iso_month: u32, iso_day: u32, hour: u32, minute: u32, second: u32, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime() constructor; see PlainDateTime::new for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn new_with_hour_and_minute_and_second_and_millisecond(
iso_year: i32,
iso_month: u32,
iso_day: u32,
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
) -> Result<PlainDateTime, RangeError>
pub fn new_with_hour_and_minute_and_second_and_millisecond( iso_year: i32, iso_month: u32, iso_day: u32, hour: u32, minute: u32, second: u32, millisecond: u32, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime() constructor; see PlainDateTime::new for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond(
iso_year: i32,
iso_month: u32,
iso_day: u32,
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
microsecond: u32,
) -> Result<PlainDateTime, RangeError>
pub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond( iso_year: i32, iso_month: u32, iso_day: u32, hour: u32, minute: u32, second: u32, millisecond: u32, microsecond: u32, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime() constructor; see PlainDateTime::new for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond_and_nanosecond(
iso_year: i32,
iso_month: u32,
iso_day: u32,
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
microsecond: u32,
nanosecond: u32,
) -> Result<PlainDateTime, RangeError>
pub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond_and_nanosecond( iso_year: i32, iso_month: u32, iso_day: u32, hour: u32, minute: u32, second: u32, millisecond: u32, microsecond: u32, nanosecond: u32, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime() constructor; see PlainDateTime::new for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond_and_nanosecond_and_calendar(
iso_year: i32,
iso_month: u32,
iso_day: u32,
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
microsecond: u32,
nanosecond: u32,
calendar: &str,
) -> Result<PlainDateTime, RangeError>
pub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond_and_nanosecond_and_calendar( iso_year: i32, iso_month: u32, iso_day: u32, hour: u32, minute: u32, second: u32, millisecond: u32, microsecond: u32, nanosecond: u32, calendar: &str, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime() constructor; see PlainDateTime::new for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_str(item: &str) -> Result<PlainDateTime, RangeError>
pub fn from_with_str(item: &str) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime.from() static method creates a new Temporal.PlainDateTime
object from another value.
§Errors
Throws a RangeError if the string is invalid or values are out of range
(when overflow is 'reject').
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_str_and_options(
item: &str,
options: &OverflowOptions,
) -> Result<PlainDateTime, RangeError>
pub fn from_with_str_and_options( item: &str, options: &OverflowOptions, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime.from() static method; see PlainDateTime::from_with_str for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_plain_date_time_like(
item: &PlainDateTimeLike,
) -> Result<PlainDateTime, Error>
pub fn from_with_plain_date_time_like( item: &PlainDateTimeLike, ) -> Result<PlainDateTime, Error>
The Temporal.PlainDateTime.from() static method taking a property bag; throws a TypeError if
required fields are missing. See PlainDateTime::from_with_str for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_plain_date_time_like_and_options(
item: &PlainDateTimeLike,
options: &OverflowOptions,
) -> Result<PlainDateTime, Error>
pub fn from_with_plain_date_time_like_and_options( item: &PlainDateTimeLike, options: &OverflowOptions, ) -> Result<PlainDateTime, Error>
The Temporal.PlainDateTime.from() static method taking a property bag; throws a TypeError if
required fields are missing. See PlainDateTime::from_with_str for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_plain_date_time(item: &PlainDateTime) -> PlainDateTime
pub fn from_with_plain_date_time(item: &PlainDateTime) -> PlainDateTime
The Temporal.PlainDateTime.from() static method.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_plain_date_time_and_options(
item: &PlainDateTime,
options: &OverflowOptions,
) -> PlainDateTime
pub fn from_with_plain_date_time_and_options( item: &PlainDateTime, options: &OverflowOptions, ) -> PlainDateTime
The Temporal.PlainDateTime.from() static method.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_plain_date(
item: &PlainDate,
) -> Result<PlainDateTime, RangeError>
pub fn from_with_plain_date( item: &PlainDate, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime.from() static method.
§Errors
Throws a RangeError if midnight on the date falls outside the representable range.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_plain_date_and_options(
item: &PlainDate,
options: &OverflowOptions,
) -> Result<PlainDateTime, RangeError>
pub fn from_with_plain_date_and_options( item: &PlainDate, options: &OverflowOptions, ) -> Result<PlainDateTime, RangeError>
The Temporal.PlainDateTime.from() static method; see PlainDateTime::from_with_plain_date for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_zoned_date_time(item: &ZonedDateTime) -> PlainDateTime
pub fn from_with_zoned_date_time(item: &ZonedDateTime) -> PlainDateTime
The Temporal.PlainDateTime.from() static method.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn from_with_zoned_date_time_and_options(
item: &ZonedDateTime,
options: &OverflowOptions,
) -> PlainDateTime
pub fn from_with_zoned_date_time_and_options( item: &ZonedDateTime, options: &OverflowOptions, ) -> PlainDateTime
The Temporal.PlainDateTime.from() static method.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn compare(one: &PlainDateTime, two: &PlainDateTime) -> i32
pub fn compare(one: &PlainDateTime, two: &PlainDateTime) -> i32
The Temporal.PlainDateTime.compare() static method returns -1, 0, or 1 depending
on whether one comes before, is equal to, or comes after two.
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn month_code(&self) -> JsString
pub fn month_code(&self) -> JsString
The monthCode accessor property returns a calendar-specific string representing
the month of this date.
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn millisecond(&self) -> u32
pub fn millisecond(&self) -> u32
The millisecond accessor property returns an integer from 0 to 999 representing
the millisecond component of this time.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn microsecond(&self) -> u32
pub fn microsecond(&self) -> u32
The microsecond accessor property returns an integer from 0 to 999 representing
the microsecond component of this time.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn nanosecond(&self) -> u32
pub fn nanosecond(&self) -> u32
The nanosecond accessor property returns an integer from 0 to 999 representing
the nanosecond component of this time.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn calendar_id(&self) -> JsString
pub fn calendar_id(&self) -> JsString
The calendarId accessor property returns a string representing the calendar
used to interpret the internal ISO 8601 date.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn day_of_week(&self) -> u32
pub fn day_of_week(&self) -> u32
The dayOfWeek accessor property returns a positive integer representing the
day of the week of this date (1 = Monday through 7 = Sunday for ISO 8601).
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn day_of_year(&self) -> u32
pub fn day_of_year(&self) -> u32
The dayOfYear accessor property returns a positive integer representing the
1-based day index of this date in the year.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn week_of_year(&self) -> Option<u32>
pub fn week_of_year(&self) -> Option<u32>
The weekOfYear accessor property returns a positive integer representing the
1-based week index in the yearOfWeek of this date, or None if the
calendar does not have a well-defined week system.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn year_of_week(&self) -> Option<i32>
pub fn year_of_week(&self) -> Option<i32>
The yearOfWeek accessor property returns an integer representing the year
to be paired with weekOfYear, or None if the calendar does not have
a well-defined week system.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn days_in_week(&self) -> u32
pub fn days_in_week(&self) -> u32
The daysInWeek accessor property returns a positive integer representing the
number of days in the week of this date.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn days_in_month(&self) -> u32
pub fn days_in_month(&self) -> u32
The daysInMonth accessor property returns a positive integer representing the
number of days in the month of this date.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn days_in_year(&self) -> u32
pub fn days_in_year(&self) -> u32
The daysInYear accessor property returns a positive integer representing the
number of days in the year of this date.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn months_in_year(&self) -> u32
pub fn months_in_year(&self) -> u32
The monthsInYear accessor property returns a positive integer representing the
number of months in the year of this date.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn in_leap_year(&self) -> bool
pub fn in_leap_year(&self) -> bool
The inLeapYear accessor property returns true if this date is in a leap year,
and false otherwise.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn equals(&self, other: &PlainDateTime) -> bool
pub fn equals(&self, other: &PlainDateTime) -> bool
The equals() method returns true if this date-time is equivalent to other.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with(&self, fields: &PlainDateTimeFields) -> Result<PlainDateTime, Error>
pub fn with(&self, fields: &PlainDateTimeFields) -> Result<PlainDateTime, Error>
The with() method returns a new Temporal.PlainDateTime object with some
fields replaced by new values.
§Errors
Throws a TypeError if no recognised field is set, and a RangeError if values are out
of range or overflow is 'reject' and a field would need constraining.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn equals_with_plain_date(
&self,
other: &PlainDate,
) -> Result<bool, RangeError>
pub fn equals_with_plain_date( &self, other: &PlainDate, ) -> Result<bool, RangeError>
The equals() method taking a Temporal.PlainDate; throws a RangeError if midnight on
the date falls outside the representable range.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn equals_with_zoned_date_time(&self, other: &ZonedDateTime) -> bool
pub fn equals_with_zoned_date_time(&self, other: &ZonedDateTime) -> bool
The equals() method taking a Temporal.ZonedDateTime.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn equals_with_plain_date_time_like(
&self,
other: &PlainDateTimeLike,
) -> Result<bool, Error>
pub fn equals_with_plain_date_time_like( &self, other: &PlainDateTimeLike, ) -> Result<bool, Error>
The equals() method taking a property bag; throws a TypeError if required fields are missing.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn equals_with_str(&self, other: &str) -> Result<bool, RangeError>
pub fn equals_with_str(&self, other: &str) -> Result<bool, RangeError>
The equals() method taking an ISO 8601 string; throws a RangeError if the string is invalid.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_with_options(
&self,
fields: &PlainDateTimeFields,
options: &OverflowOptions,
) -> Result<PlainDateTime, Error>
pub fn with_with_options( &self, fields: &PlainDateTimeFields, options: &OverflowOptions, ) -> Result<PlainDateTime, Error>
The with() method returns a new Temporal.PlainDateTime object with some
fields replaced by new values.
§Errors
Throws a TypeError if no recognised field is set, and a RangeError if values are out
of range or overflow is 'reject' and a field would need constraining.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_plain_time(&self) -> Result<PlainDateTime, RangeError>
pub fn with_plain_time(&self) -> Result<PlainDateTime, RangeError>
The withPlainTime() method returns a new Temporal.PlainDateTime object with
the time part replaced by the given time (or midnight if not provided).
§Errors
Throws a RangeError if the result falls outside the representable range.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_plain_time_with_plain_time(
&self,
plain_time: &PlainTime,
) -> Result<PlainDateTime, RangeError>
pub fn with_plain_time_with_plain_time( &self, plain_time: &PlainTime, ) -> Result<PlainDateTime, RangeError>
The withPlainTime() method returns a new Temporal.PlainDateTime object with
the time part replaced by the given time (or midnight if not provided).
§Errors
Throws a RangeError if the result falls outside the representable range.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_calendar(&self, calendar: &str) -> Result<PlainDateTime, RangeError>
pub fn with_calendar(&self, calendar: &str) -> Result<PlainDateTime, RangeError>
The withCalendar() method returns a new Temporal.PlainDateTime object with
the calendar replaced.
§Errors
Throws a RangeError if the calendar identifier is invalid.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_plain_time_with_str(
&self,
plain_time: &str,
) -> Result<PlainDateTime, RangeError>
pub fn with_plain_time_with_str( &self, plain_time: &str, ) -> Result<PlainDateTime, RangeError>
The withPlainTime() method taking an ISO 8601 string; throws a RangeError if the string is invalid; see PlainDateTime::with_plain_time for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_plain_time_with_plain_time_like(
&self,
plain_time: &PlainTimeLike,
) -> Result<PlainDateTime, Error>
pub fn with_plain_time_with_plain_time_like( &self, plain_time: &PlainTimeLike, ) -> Result<PlainDateTime, Error>
The withPlainTime() method taking a property bag; throws a TypeError if no time field is present; see PlainDateTime::with_plain_time for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_plain_time_with_plain_date_time(
&self,
plain_time: &PlainDateTime,
) -> Result<PlainDateTime, RangeError>
pub fn with_plain_time_with_plain_date_time( &self, plain_time: &PlainDateTime, ) -> Result<PlainDateTime, RangeError>
The withPlainTime() method taking a Temporal.PlainDateTime; see PlainDateTime::with_plain_time for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_plain_time_with_zoned_date_time(
&self,
plain_time: &ZonedDateTime,
) -> Result<PlainDateTime, RangeError>
pub fn with_plain_time_with_zoned_date_time( &self, plain_time: &ZonedDateTime, ) -> Result<PlainDateTime, RangeError>
The withPlainTime() method taking a Temporal.ZonedDateTime; see PlainDateTime::with_plain_time for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_calendar_with_plain_date(
&self,
calendar: &PlainDate,
) -> PlainDateTime
pub fn with_calendar_with_plain_date( &self, calendar: &PlainDate, ) -> PlainDateTime
The withCalendar() method taking the calendar of the given Temporal.PlainDate.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_calendar_with_plain_date_time(
&self,
calendar: &PlainDateTime,
) -> PlainDateTime
pub fn with_calendar_with_plain_date_time( &self, calendar: &PlainDateTime, ) -> PlainDateTime
The withCalendar() method taking the calendar of the given Temporal.PlainDateTime.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_calendar_with_plain_year_month(
&self,
calendar: &PlainYearMonth,
) -> PlainDateTime
pub fn with_calendar_with_plain_year_month( &self, calendar: &PlainYearMonth, ) -> PlainDateTime
The withCalendar() method taking the calendar of the given Temporal.PlainYearMonth.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_calendar_with_plain_month_day(
&self,
calendar: &PlainMonthDay,
) -> PlainDateTime
pub fn with_calendar_with_plain_month_day( &self, calendar: &PlainMonthDay, ) -> PlainDateTime
The withCalendar() method taking the calendar of the given Temporal.PlainMonthDay.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn with_calendar_with_zoned_date_time(
&self,
calendar: &ZonedDateTime,
) -> PlainDateTime
pub fn with_calendar_with_zoned_date_time( &self, calendar: &ZonedDateTime, ) -> PlainDateTime
The withCalendar() method taking the calendar of the given Temporal.ZonedDateTime.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn add(&self, duration: &Duration) -> Result<PlainDateTime, RangeError>
pub fn add(&self, duration: &Duration) -> Result<PlainDateTime, RangeError>
The add() method returns a new Temporal.PlainDateTime object with the
duration added to this date-time.
§Errors
Throws a RangeError if the result is out of range, or if overflow is 'reject' and a
field would need constraining.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn add_with_options(
&self,
duration: &Duration,
options: &OverflowOptions,
) -> Result<PlainDateTime, RangeError>
pub fn add_with_options( &self, duration: &Duration, options: &OverflowOptions, ) -> Result<PlainDateTime, RangeError>
The add() method returns a new Temporal.PlainDateTime object with the
duration added to this date-time.
§Errors
Throws a RangeError if the result is out of range, or if overflow is 'reject' and a
field would need constraining.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn add_with_duration_like(
&self,
duration: &DurationLike,
) -> Result<PlainDateTime, Error>
pub fn add_with_duration_like( &self, duration: &DurationLike, ) -> Result<PlainDateTime, Error>
The add() method taking a duration property bag.
§Errors
Throws a TypeError if no duration field is set; see PlainDateTime::add for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn add_with_duration_like_and_options(
&self,
duration: &DurationLike,
options: &OverflowOptions,
) -> Result<PlainDateTime, Error>
pub fn add_with_duration_like_and_options( &self, duration: &DurationLike, options: &OverflowOptions, ) -> Result<PlainDateTime, Error>
The add() method taking a duration property bag and options; see
PlainDateTime::add_with_duration_like for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn add_with_str_and_options(
&self,
duration: &str,
options: &OverflowOptions,
) -> Result<PlainDateTime, RangeError>
pub fn add_with_str_and_options( &self, duration: &str, options: &OverflowOptions, ) -> Result<PlainDateTime, RangeError>
The add() method taking an ISO 8601 duration string and options; see
PlainDateTime::add_with_str for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn add_with_str(&self, duration: &str) -> Result<PlainDateTime, RangeError>
pub fn add_with_str(&self, duration: &str) -> Result<PlainDateTime, RangeError>
The add() method taking an ISO 8601 duration string.
§Errors
Throws a RangeError if the string is not a valid duration; see PlainDateTime::add for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn subtract(&self, duration: &Duration) -> Result<PlainDateTime, RangeError>
pub fn subtract(&self, duration: &Duration) -> Result<PlainDateTime, RangeError>
The subtract() method returns a new Temporal.PlainDateTime object with the
duration subtracted from this date-time.
§Errors
Throws a RangeError if the result is out of range, or if overflow is 'reject' and a
field would need constraining.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn subtract_with_options(
&self,
duration: &Duration,
options: &OverflowOptions,
) -> Result<PlainDateTime, RangeError>
pub fn subtract_with_options( &self, duration: &Duration, options: &OverflowOptions, ) -> Result<PlainDateTime, RangeError>
The subtract() method returns a new Temporal.PlainDateTime object with the
duration subtracted from this date-time.
§Errors
Throws a RangeError if the result is out of range, or if overflow is 'reject' and a
field would need constraining.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn subtract_with_duration_like(
&self,
duration: &DurationLike,
) -> Result<PlainDateTime, Error>
pub fn subtract_with_duration_like( &self, duration: &DurationLike, ) -> Result<PlainDateTime, Error>
The subtract() method taking a duration property bag.
§Errors
Throws a TypeError if no duration field is set; see PlainDateTime::subtract for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn subtract_with_duration_like_and_options(
&self,
duration: &DurationLike,
options: &OverflowOptions,
) -> Result<PlainDateTime, Error>
pub fn subtract_with_duration_like_and_options( &self, duration: &DurationLike, options: &OverflowOptions, ) -> Result<PlainDateTime, Error>
The subtract() method taking a duration property bag and options; see
PlainDateTime::subtract_with_duration_like for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn subtract_with_str_and_options(
&self,
duration: &str,
options: &OverflowOptions,
) -> Result<PlainDateTime, RangeError>
pub fn subtract_with_str_and_options( &self, duration: &str, options: &OverflowOptions, ) -> Result<PlainDateTime, RangeError>
The subtract() method taking an ISO 8601 duration string and options; see
PlainDateTime::subtract_with_str for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn subtract_with_str(
&self,
duration: &str,
) -> Result<PlainDateTime, RangeError>
pub fn subtract_with_str( &self, duration: &str, ) -> Result<PlainDateTime, RangeError>
The subtract() method taking an ISO 8601 duration string.
§Errors
Throws a RangeError if the string is not a valid duration; see PlainDateTime::subtract for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until(&self, other: &PlainDateTime) -> Result<Duration, RangeError>
pub fn until(&self, other: &PlainDateTime) -> Result<Duration, RangeError>
The until() method returns a Temporal.Duration representing the duration
from this date-time until other.
§Errors
Throws a RangeError if datetimes have different calendars or options are invalid.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_options(
&self,
other: &PlainDateTime,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn until_with_options( &self, other: &PlainDateTime, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The until() method returns a Temporal.Duration representing the duration
from this date-time until other.
§Errors
Throws a RangeError if datetimes have different calendars or options are invalid.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since(&self, other: &PlainDateTime) -> Result<Duration, RangeError>
pub fn since(&self, other: &PlainDateTime) -> Result<Duration, RangeError>
The since() method returns a Temporal.Duration representing the duration
from other until this date-time.
§Errors
Throws a RangeError if datetimes have different calendars or options are invalid.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_plain_date(
&self,
other: &PlainDate,
) -> Result<Duration, RangeError>
pub fn until_with_plain_date( &self, other: &PlainDate, ) -> Result<Duration, RangeError>
The until() method taking a Temporal.PlainDate; see PlainDateTime::until for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_plain_date_and_options(
&self,
other: &PlainDate,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn until_with_plain_date_and_options( &self, other: &PlainDate, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The until() method taking a Temporal.PlainDate and options; see PlainDateTime::until_with_options
for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_zoned_date_time(
&self,
other: &ZonedDateTime,
) -> Result<Duration, RangeError>
pub fn until_with_zoned_date_time( &self, other: &ZonedDateTime, ) -> Result<Duration, RangeError>
The until() method taking a Temporal.ZonedDateTime; see PlainDateTime::until for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_zoned_date_time_and_options(
&self,
other: &ZonedDateTime,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn until_with_zoned_date_time_and_options( &self, other: &ZonedDateTime, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The until() method taking a Temporal.ZonedDateTime and options; see PlainDateTime::until_with_options
for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_plain_date_time_like(
&self,
other: &PlainDateTimeLike,
) -> Result<Duration, Error>
pub fn until_with_plain_date_time_like( &self, other: &PlainDateTimeLike, ) -> Result<Duration, Error>
The until() method taking a property bag; throws a TypeError if required fields are missing; see PlainDateTime::until for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_plain_date_time_like_and_options(
&self,
other: &PlainDateTimeLike,
options: &DifferenceOptions,
) -> Result<Duration, Error>
pub fn until_with_plain_date_time_like_and_options( &self, other: &PlainDateTimeLike, options: &DifferenceOptions, ) -> Result<Duration, Error>
The until() method taking a property bag and options; throws a TypeError if required
fields are missing. See PlainDateTime::until_with_options for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_str(&self, other: &str) -> Result<Duration, RangeError>
pub fn until_with_str(&self, other: &str) -> Result<Duration, RangeError>
The until() method taking an ISO 8601 string; throws a RangeError if the string is invalid; see PlainDateTime::until for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn until_with_str_and_options(
&self,
other: &str,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn until_with_str_and_options( &self, other: &str, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The until() method taking an ISO 8601 string and options; see PlainDateTime::until_with_options
for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_options(
&self,
other: &PlainDateTime,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn since_with_options( &self, other: &PlainDateTime, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The since() method returns a Temporal.Duration representing the duration
from other until this date-time.
§Errors
Throws a RangeError if datetimes have different calendars or options are invalid.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn round(
&self,
round_to: &RoundToOptions,
) -> Result<PlainDateTime, RangeError>
pub fn round( &self, round_to: &RoundToOptions, ) -> Result<PlainDateTime, RangeError>
The round() method returns a new Temporal.PlainDateTime object with the
date-time rounded to the given unit.
§Errors
Throws a RangeError if smallestUnit is not provided, specifies invalid units,
or if roundingIncrement is invalid for the unit.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_plain_date(
&self,
other: &PlainDate,
) -> Result<Duration, RangeError>
pub fn since_with_plain_date( &self, other: &PlainDate, ) -> Result<Duration, RangeError>
The since() method taking a Temporal.PlainDate; see PlainDateTime::since for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_plain_date_and_options(
&self,
other: &PlainDate,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn since_with_plain_date_and_options( &self, other: &PlainDate, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The since() method taking a Temporal.PlainDate and options; see PlainDateTime::since_with_options
for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_zoned_date_time(
&self,
other: &ZonedDateTime,
) -> Result<Duration, RangeError>
pub fn since_with_zoned_date_time( &self, other: &ZonedDateTime, ) -> Result<Duration, RangeError>
The since() method taking a Temporal.ZonedDateTime; see PlainDateTime::since for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_zoned_date_time_and_options(
&self,
other: &ZonedDateTime,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn since_with_zoned_date_time_and_options( &self, other: &ZonedDateTime, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The since() method taking a Temporal.ZonedDateTime and options; see PlainDateTime::since_with_options
for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_plain_date_time_like(
&self,
other: &PlainDateTimeLike,
) -> Result<Duration, Error>
pub fn since_with_plain_date_time_like( &self, other: &PlainDateTimeLike, ) -> Result<Duration, Error>
The since() method taking a property bag; throws a TypeError if required fields are missing; see PlainDateTime::since for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_plain_date_time_like_and_options(
&self,
other: &PlainDateTimeLike,
options: &DifferenceOptions,
) -> Result<Duration, Error>
pub fn since_with_plain_date_time_like_and_options( &self, other: &PlainDateTimeLike, options: &DifferenceOptions, ) -> Result<Duration, Error>
The since() method taking a property bag and options; throws a TypeError if required
fields are missing. See PlainDateTime::since_with_options for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_str(&self, other: &str) -> Result<Duration, RangeError>
pub fn since_with_str(&self, other: &str) -> Result<Duration, RangeError>
The since() method taking an ISO 8601 string; throws a RangeError if the string is invalid; see PlainDateTime::since for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn since_with_str_and_options(
&self,
other: &str,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn since_with_str_and_options( &self, other: &str, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The since() method taking an ISO 8601 string and options; see PlainDateTime::since_with_options
for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn round_with_unit(
&self,
smallest_unit: Unit,
) -> Result<PlainDateTime, RangeError>
pub fn round_with_unit( &self, smallest_unit: Unit, ) -> Result<PlainDateTime, RangeError>
Shorthand for round() with only smallestUnit set.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_zoned_date_time(
&self,
time_zone: &str,
) -> Result<ZonedDateTime, RangeError>
pub fn to_zoned_date_time( &self, time_zone: &str, ) -> Result<ZonedDateTime, RangeError>
The toZonedDateTime() method returns a Temporal.ZonedDateTime with the
same calendar date and wall-clock time in the given time zone.
§Errors
Throws a RangeError if time_zone is not a valid time zone identifier,
or if disambiguation is 'reject' and the wall-clock time is ambiguous
or does not exist in that time zone.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_zoned_date_time_with_options(
&self,
time_zone: &str,
options: &DisambiguationOptions,
) -> Result<ZonedDateTime, RangeError>
pub fn to_zoned_date_time_with_options( &self, time_zone: &str, options: &DisambiguationOptions, ) -> Result<ZonedDateTime, RangeError>
The toZonedDateTime() method returns a Temporal.ZonedDateTime with the
same calendar date and wall-clock time in the given time zone.
§Errors
Throws a RangeError if time_zone is not a valid time zone identifier,
or if disambiguation is 'reject' and the wall-clock time is ambiguous
or does not exist in that time zone.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_zoned_date_time_with_zoned_date_time(
&self,
time_zone: &ZonedDateTime,
) -> Result<ZonedDateTime, RangeError>
pub fn to_zoned_date_time_with_zoned_date_time( &self, time_zone: &ZonedDateTime, ) -> Result<ZonedDateTime, RangeError>
The toZonedDateTime() method in the time zone of the given
Temporal.ZonedDateTime; see PlainDateTime::to_zoned_date_time for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_zoned_date_time_with_zoned_date_time_and_options(
&self,
time_zone: &ZonedDateTime,
options: &DisambiguationOptions,
) -> Result<ZonedDateTime, RangeError>
pub fn to_zoned_date_time_with_zoned_date_time_and_options( &self, time_zone: &ZonedDateTime, options: &DisambiguationOptions, ) -> Result<ZonedDateTime, RangeError>
The toZonedDateTime() method in the time zone of the given
Temporal.ZonedDateTime; see PlainDateTime::to_zoned_date_time for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_plain_date(&self) -> PlainDate
pub fn to_plain_date(&self) -> PlainDate
The toPlainDate() method returns a Temporal.PlainDate object representing
the date part of this date-time.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_plain_time(&self) -> PlainTime
pub fn to_plain_time(&self) -> PlainTime
The toPlainTime() method returns a Temporal.PlainTime object representing
the time part of this date-time.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_locale_string(&self) -> Result<JsString, RangeError>
pub fn to_locale_string(&self) -> Result<JsString, RangeError>
The toLocaleString() method returns a language-sensitive string representation
of this date-time.
§Errors
Throws a RangeError if locales is invalid or the locale’s calendar does
not match this value’s calendar.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_locale_string_with_str(
&self,
locales: &str,
) -> Result<JsString, RangeError>
pub fn to_locale_string_with_str( &self, locales: &str, ) -> Result<JsString, RangeError>
The toLocaleString() method; see PlainDateTime::to_locale_string for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_locale_string_with_str_sequence(
&self,
locales: &[JsString],
) -> Result<JsString, RangeError>
pub fn to_locale_string_with_str_sequence( &self, locales: &[JsString], ) -> Result<JsString, RangeError>
The toLocaleString() method; see PlainDateTime::to_locale_string for errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_locale_string_with_str_sequence_and_options(
&self,
locales: &[JsString],
options: &DateTimeFormatOptions,
) -> Result<JsString, Error>
pub fn to_locale_string_with_str_sequence_and_options( &self, locales: &[JsString], options: &DateTimeFormatOptions, ) -> Result<JsString, Error>
The toLocaleString() method with options; throws a TypeError if an option does not
apply to this type or conflicts with another. See PlainDateTime::to_locale_string for the
remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_locale_string_with_options(
&self,
locales: Option<&str>,
options: &DateTimeFormatOptions,
) -> Result<JsString, Error>
pub fn to_locale_string_with_options( &self, locales: Option<&str>, options: &DateTimeFormatOptions, ) -> Result<JsString, Error>
The toLocaleString() method with options; None for locales uses the default locale.
Throws a TypeError if an option does not apply to this type or conflicts with another.
See PlainDateTime::to_locale_string for the remaining errors.
Source§impl PlainDateTime
impl PlainDateTime
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_js_string(&self) -> JsString
pub fn to_js_string(&self) -> JsString
The toString() method returns an RFC 9557 string representation of this date-time.
Source§impl PlainDateTime
impl PlainDateTime
Sourcepub fn to_js_string_with_options(
&self,
options: &CalendarTypeToStringOptions,
) -> Result<JsString, RangeError>
pub fn to_js_string_with_options( &self, options: &CalendarTypeToStringOptions, ) -> Result<JsString, RangeError>
The toString() method returns an RFC 9557 string representation of this date-time,
formatted according to options.
§Errors
Throws a RangeError if the options are invalid for this type.
Methods from Deref<Target = Object>§
Sourcepub fn constructor(&self) -> Function
pub fn constructor(&self) -> Function
The constructor property returns a reference to the Object constructor
function that created the instance object.
Sourcepub fn has_own_property(&self, property: &JsValue) -> bool
👎Deprecated: Use Object::hasOwn instead.
pub fn has_own_property(&self, property: &JsValue) -> bool
Use Object::hasOwn instead.
The hasOwnProperty() method returns a boolean indicating whether the
object has the specified property as its own property (as opposed to
inheriting it).
Sourcepub fn is_prototype_of(&self, value: &JsValue) -> bool
pub fn is_prototype_of(&self, value: &JsValue) -> bool
The isPrototypeOf() method checks if an object exists in another
object’s prototype chain.
Sourcepub fn property_is_enumerable(&self, property: &JsValue) -> bool
pub fn property_is_enumerable(&self, property: &JsValue) -> bool
The propertyIsEnumerable() method returns a Boolean indicating
whether the specified property is enumerable.
Sourcepub fn to_locale_string(&self) -> JsString
pub fn to_locale_string(&self) -> JsString
The toLocaleString() method returns a string representing the object.
This method is meant to be overridden by derived objects for
locale-specific purposes.
Sourcepub fn to_string(&self) -> JsString
pub fn to_string(&self) -> JsString
The toString() method returns a string representing the object.
Sourcepub fn to_js_string(&self) -> JsString
pub fn to_js_string(&self) -> JsString
The toString() method returns a string representing the object.
Methods from Deref<Target = JsValue>§
Sourcepub fn as_f64(&self) -> Option<f64>
pub fn as_f64(&self) -> Option<f64>
Returns the f64 value of this JS value if it’s an instance of a
number.
If this JS value is not an instance of a number then this returns
None.
Sourcepub fn as_string(&self) -> Option<String>
pub fn as_string(&self) -> Option<String>
If this JS value is a string value, this function copies the JS string
value into Wasm linear memory, encoded as UTF-8, and returns it as a
Rust String.
To avoid the copying and re-encoding, consider the
JsString::try_from() function from js-sys
instead.
If this JS value is not an instance of a string or if it’s not valid
utf-8 then this returns None.
§UTF-16 vs UTF-8
JavaScript strings in general are encoded as UTF-16, but Rust strings
are encoded as UTF-8. This can cause the Rust string to look a bit
different than the JS string sometimes. For more details see the
documentation about the str type which contains a few
caveats about the encodings.
Sourcepub fn as_bool(&self) -> Option<bool>
pub fn as_bool(&self) -> Option<bool>
Returns the bool value of this JS value if it’s an instance of a
boolean.
If this JS value is not an instance of a boolean then this returns
None.
Sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
Tests whether this JS value is undefined
Sourcepub fn is_null_or_undefined(&self) -> bool
pub fn is_null_or_undefined(&self) -> bool
Tests whether this JS value is null or undefined
Sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Tests whether the type of this JS value is function.
Sourcepub fn js_in(&self, obj: &JsValue) -> bool
pub fn js_in(&self, obj: &JsValue) -> bool
Applies the binary in JS operator on the two JsValues.
Sourcepub fn loose_eq(&self, other: &JsValue) -> bool
pub fn loose_eq(&self, other: &JsValue) -> bool
Compare two JsValues for equality, using the == operator in JS.
Sourcepub fn unsigned_shr(&self, rhs: &JsValue) -> u32
pub fn unsigned_shr(&self, rhs: &JsValue) -> u32
Applies the binary >>> JS operator on the two JsValues.
Sourcepub fn checked_div(&self, rhs: &JsValue) -> JsValue
pub fn checked_div(&self, rhs: &JsValue) -> JsValue
Applies the binary / JS operator on two JsValues, catching and returning any RangeError thrown.
Sourcepub fn pow(&self, rhs: &JsValue) -> JsValue
pub fn pow(&self, rhs: &JsValue) -> JsValue
Applies the binary ** JS operator on the two JsValues.
Sourcepub fn lt(&self, other: &JsValue) -> bool
pub fn lt(&self, other: &JsValue) -> bool
Applies the binary < JS operator on the two JsValues.
Sourcepub fn le(&self, other: &JsValue) -> bool
pub fn le(&self, other: &JsValue) -> bool
Applies the binary <= JS operator on the two JsValues.
Sourcepub fn ge(&self, other: &JsValue) -> bool
pub fn ge(&self, other: &JsValue) -> bool
Applies the binary >= JS operator on the two JsValues.
Sourcepub fn gt(&self, other: &JsValue) -> bool
pub fn gt(&self, other: &JsValue) -> bool
Applies the binary > JS operator on the two JsValues.
Sourcepub fn unchecked_into_f64(&self) -> f64
pub fn unchecked_into_f64(&self) -> f64
Applies the unary + JS operator on a JsValue. Can throw.
Trait Implementations§
Source§impl AsRef<JsValue> for PlainDateTime
impl AsRef<JsValue> for PlainDateTime
Source§impl AsRef<Object> for PlainDateTime
impl AsRef<Object> for PlainDateTime
Source§impl AsRef<PlainDateTime> for PlainDateTime
impl AsRef<PlainDateTime> for PlainDateTime
Source§fn as_ref(&self) -> &PlainDateTime
fn as_ref(&self) -> &PlainDateTime
Source§impl Clone for PlainDateTime
impl Clone for PlainDateTime
Source§impl Debug for PlainDateTime
impl Debug for PlainDateTime
Source§impl Deref for PlainDateTime
impl Deref for PlainDateTime
impl Eq for PlainDateTime
Source§impl ErasableGeneric for PlainDateTime
impl ErasableGeneric for PlainDateTime
Source§impl From<JsValue> for PlainDateTime
impl From<JsValue> for PlainDateTime
Source§impl From<PlainDateTime> for JsValue
impl From<PlainDateTime> for JsValue
Source§fn from(obj: PlainDateTime) -> JsValue
fn from(obj: PlainDateTime) -> JsValue
Source§impl From<PlainDateTime> for Object
impl From<PlainDateTime> for Object
Source§fn from(obj: PlainDateTime) -> Object
fn from(obj: PlainDateTime) -> Object
Source§impl FromWasmAbi for PlainDateTime
impl FromWasmAbi for PlainDateTime
Source§impl IntoJsGeneric for PlainDateTimewhere
PlainDateTime: JsGeneric,
impl IntoJsGeneric for PlainDateTimewhere
PlainDateTime: JsGeneric,
Source§type JsCanon = PlainDateTime
type JsCanon = PlainDateTime
JsGeneric form of this type.Source§fn to_js(self) -> PlainDateTime
fn to_js(self) -> PlainDateTime
JsGeneric value for self.Source§impl IntoWasmAbi for PlainDateTime
impl IntoWasmAbi for PlainDateTime
Source§impl<'__wbg_ref> IntoWasmAbi for &'__wbg_ref PlainDateTime
impl<'__wbg_ref> IntoWasmAbi for &'__wbg_ref PlainDateTime
Source§impl JsCast for PlainDateTime
impl JsCast for PlainDateTime
Source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof check to see whether the JsValue
provided is an instance of this type. Read moreSource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
Source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
Source§fn has_type<T>(&self) -> boolwhere
T: JsCast,
fn has_type<T>(&self) -> boolwhere
T: JsCast,
T. Read moreSource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T. Read moreSource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T. Read moreSource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
Source§fn unchecked_ref<T>(&self) -> &Twhere
T: JsCast,
fn unchecked_ref<T>(&self) -> &Twhere
T: JsCast,
Source§impl LongRefFromWasmAbi for PlainDateTime
impl LongRefFromWasmAbi for PlainDateTime
Source§type Anchor = PlainDateTime
type Anchor = PlainDateTime
RefFromWasmAbi::AnchorSource§unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
RefFromWasmAbi::ref_from_abiSource§impl NullableFromWasmAbi for PlainDateTime
impl NullableFromWasmAbi for PlainDateTime
Source§impl NullableIntoWasmAbi for PlainDateTime
impl NullableIntoWasmAbi for PlainDateTime
Source§impl<'__wbg_ref> NullableIntoWasmAbi for &'__wbg_ref PlainDateTime
impl<'__wbg_ref> NullableIntoWasmAbi for &'__wbg_ref PlainDateTime
Source§impl OptionFromWasmAbi for PlainDateTime
impl OptionFromWasmAbi for PlainDateTime
Source§impl OptionIntoWasmAbi for PlainDateTime
impl OptionIntoWasmAbi for PlainDateTime
Source§impl<'__wbg_ref> OptionIntoWasmAbi for &'__wbg_ref PlainDateTime
impl<'__wbg_ref> OptionIntoWasmAbi for &'__wbg_ref PlainDateTime
Source§impl PartialEq for PlainDateTime
impl PartialEq for PlainDateTime
Source§impl Promising for PlainDateTime
impl Promising for PlainDateTime
Source§type Resolution = PlainDateTime
type Resolution = PlainDateTime
Source§impl RefFromWasmAbi for PlainDateTime
impl RefFromWasmAbi for PlainDateTime
Source§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self are recovered from.Source§type Anchor = ManuallyDrop<PlainDateTime>
type Anchor = ManuallyDrop<PlainDateTime>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.impl UpcastFrom<PlainDateTime> for JsValue
impl UpcastFrom<PlainDateTime> for JsOption<JsValue>
impl UpcastFrom<PlainDateTime> for JsNullable<JsValue>
impl<__UpcastWrapTarget> UpcastFrom<PlainDateTime> for Option<__UpcastWrapTarget>where
__UpcastWrapTarget: UpcastFrom<PlainDateTime>,
impl<__UpcastWrapTarget> UpcastFrom<PlainDateTime> for Nullable<__UpcastWrapTarget>where
__UpcastWrapTarget: UpcastFrom<PlainDateTime>,
impl UpcastFrom<PlainDateTime> for PlainDateTime
impl UpcastFrom<PlainDateTime> for JsOption<PlainDateTime>
impl UpcastFrom<PlainDateTime> for JsNullable<PlainDateTime>
impl UpcastFrom<PlainDateTime> for Object
impl UpcastFrom<PlainDateTime> for JsOption<Object>
impl UpcastFrom<PlainDateTime> for JsNullable<Object>
Source§impl VectorRefIntoWasmAbi for PlainDateTime
impl VectorRefIntoWasmAbi for PlainDateTime
fn slice_into_abi(slice: &[Self]) -> WasmSlice
impl VectorRefIntoWasmAbiSealed for PlainDateTime
Auto Trait Implementations§
impl Forget for PlainDateTime
impl Freeze for PlainDateTime
impl Move for PlainDateTime
impl RefUnwindSafe for PlainDateTime
impl Send for PlainDateTime
impl Sync for PlainDateTime
impl Unpin for PlainDateTime
impl UnsafeUnpin for PlainDateTime
impl UnwindSafe for PlainDateTime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> JsGeneric for T
Source§impl<T> MaybeFromWasmAbi for Twhere
T: OptionFromWasmAbi,
impl<T> MaybeFromWasmAbi for Twhere
T: OptionFromWasmAbi,
Source§type MaybeAbi = <T as FromWasmAbi>::Abi
type MaybeAbi = <T as FromWasmAbi>::Abi
Option<Self>.Source§unsafe fn from_maybe_abi(js: <T as FromWasmAbi>::Abi) -> T
unsafe fn from_maybe_abi(js: <T as FromWasmAbi>::Abi) -> T
unsafe fn try_from_maybe_abi( js: <T as FromWasmAbi>::Abi, ) -> Result<T, &'static str>
Source§impl<T> MaybeIntoWasmAbi for Twhere
T: OptionIntoWasmAbi,
impl<T> MaybeIntoWasmAbi for Twhere
T: OptionIntoWasmAbi,
Source§type MaybeAbi = <T as IntoWasmAbi>::Abi
type MaybeAbi = <T as IntoWasmAbi>::Abi
Option<Self>.Source§fn into_maybe_abi(self) -> <T as IntoWasmAbi>::Abi
fn into_maybe_abi(self) -> <T as IntoWasmAbi>::Abi
Option<Self> ABI.Source§impl<T, A> RefIntoWasmAbi for T
impl<T, A> RefIntoWasmAbi for T
Source§fn describe_ref()
fn describe_ref()
&Self.Source§fn ref_into_abi(&self) -> A
fn ref_into_abi(&self) -> A
&self into Self::Abi.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
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.