pub struct PlainTime { /* private fields */ }Expand description
A Temporal.PlainTime represents a wall-clock time, with a precision in
nanoseconds, and without any time zone or calendar information.
Implementations§
Source§impl PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
Sourcepub fn new_with_hour(hour: u32) -> Result<PlainTime, RangeError>
pub fn new_with_hour(hour: u32) -> Result<PlainTime, RangeError>
The Temporal.PlainTime() constructor with the leading fields set.
§Errors
Throws a RangeError if any field is out of range.
Source§impl PlainTime
impl PlainTime
Sourcepub fn new_with_hour_and_minute(
hour: u32,
minute: u32,
) -> Result<PlainTime, RangeError>
pub fn new_with_hour_and_minute( hour: u32, minute: u32, ) -> Result<PlainTime, RangeError>
The Temporal.PlainTime() constructor; see PlainTime::new_with_hour for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn new_with_hour_and_minute_and_second(
hour: u32,
minute: u32,
second: u32,
) -> Result<PlainTime, RangeError>
pub fn new_with_hour_and_minute_and_second( hour: u32, minute: u32, second: u32, ) -> Result<PlainTime, RangeError>
The Temporal.PlainTime() constructor; see PlainTime::new_with_hour for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn new_with_hour_and_minute_and_second_and_millisecond(
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
) -> Result<PlainTime, RangeError>
pub fn new_with_hour_and_minute_and_second_and_millisecond( hour: u32, minute: u32, second: u32, millisecond: u32, ) -> Result<PlainTime, RangeError>
The Temporal.PlainTime() constructor; see PlainTime::new_with_hour for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond(
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
microsecond: u32,
) -> Result<PlainTime, RangeError>
pub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond( hour: u32, minute: u32, second: u32, millisecond: u32, microsecond: u32, ) -> Result<PlainTime, RangeError>
The Temporal.PlainTime() constructor; see PlainTime::new_with_hour for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond_and_nanosecond(
hour: u32,
minute: u32,
second: u32,
millisecond: u32,
microsecond: u32,
nanosecond: u32,
) -> Result<PlainTime, RangeError>
pub fn new_with_hour_and_minute_and_second_and_millisecond_and_microsecond_and_nanosecond( hour: u32, minute: u32, second: u32, millisecond: u32, microsecond: u32, nanosecond: u32, ) -> Result<PlainTime, RangeError>
The Temporal.PlainTime() constructor; see PlainTime::new_with_hour for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_str(item: &str) -> Result<PlainTime, RangeError>
pub fn from_with_str(item: &str) -> Result<PlainTime, RangeError>
The Temporal.PlainTime.from() static method creates a new Temporal.PlainTime
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 PlainTime
impl PlainTime
Sourcepub fn from_with_str_and_options(
item: &str,
options: &OverflowOptions,
) -> Result<PlainTime, RangeError>
pub fn from_with_str_and_options( item: &str, options: &OverflowOptions, ) -> Result<PlainTime, RangeError>
The Temporal.PlainTime.from() static method; see PlainTime::from_with_str for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_plain_time_like(
item: &PlainTimeLike,
) -> Result<PlainTime, Error>
pub fn from_with_plain_time_like( item: &PlainTimeLike, ) -> Result<PlainTime, Error>
The Temporal.PlainTime.from() static method taking a property bag; throws a TypeError if
required fields are missing. See PlainTime::from_with_str for the remaining errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_plain_time_like_and_options(
item: &PlainTimeLike,
options: &OverflowOptions,
) -> Result<PlainTime, Error>
pub fn from_with_plain_time_like_and_options( item: &PlainTimeLike, options: &OverflowOptions, ) -> Result<PlainTime, Error>
The Temporal.PlainTime.from() static method taking a property bag; throws a TypeError if
required fields are missing. See PlainTime::from_with_str for the remaining errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_plain_time(item: &PlainTime) -> PlainTime
pub fn from_with_plain_time(item: &PlainTime) -> PlainTime
The Temporal.PlainTime.from() static method.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_plain_time_and_options(
item: &PlainTime,
options: &OverflowOptions,
) -> PlainTime
pub fn from_with_plain_time_and_options( item: &PlainTime, options: &OverflowOptions, ) -> PlainTime
The Temporal.PlainTime.from() static method.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_plain_date_time(item: &PlainDateTime) -> PlainTime
pub fn from_with_plain_date_time(item: &PlainDateTime) -> PlainTime
The Temporal.PlainTime.from() static method.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_plain_date_time_and_options(
item: &PlainDateTime,
options: &OverflowOptions,
) -> PlainTime
pub fn from_with_plain_date_time_and_options( item: &PlainDateTime, options: &OverflowOptions, ) -> PlainTime
The Temporal.PlainTime.from() static method.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_zoned_date_time(item: &ZonedDateTime) -> PlainTime
pub fn from_with_zoned_date_time(item: &ZonedDateTime) -> PlainTime
The Temporal.PlainTime.from() static method.
Source§impl PlainTime
impl PlainTime
Sourcepub fn from_with_zoned_date_time_and_options(
item: &ZonedDateTime,
options: &OverflowOptions,
) -> PlainTime
pub fn from_with_zoned_date_time_and_options( item: &ZonedDateTime, options: &OverflowOptions, ) -> PlainTime
The Temporal.PlainTime.from() static method.
Source§impl PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
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 PlainTime
impl PlainTime
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 PlainTime
impl PlainTime
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 PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
Sourcepub fn with(&self, fields: &PlainTimeLike) -> Result<PlainTime, Error>
pub fn with(&self, fields: &PlainTimeLike) -> Result<PlainTime, Error>
The with() method returns a new Temporal.PlainTime 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 PlainTime
impl PlainTime
Sourcepub fn equals_with_plain_date_time(&self, other: &PlainDateTime) -> bool
pub fn equals_with_plain_date_time(&self, other: &PlainDateTime) -> bool
The equals() method taking a Temporal.PlainDateTime.
Source§impl PlainTime
impl PlainTime
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 PlainTime
impl PlainTime
Sourcepub fn equals_with_plain_time_like(
&self,
other: &PlainTimeLike,
) -> Result<bool, Error>
pub fn equals_with_plain_time_like( &self, other: &PlainTimeLike, ) -> Result<bool, Error>
The equals() method taking a property bag; throws a TypeError if required fields are missing.
Source§impl PlainTime
impl PlainTime
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 PlainTime
impl PlainTime
Sourcepub fn with_with_options(
&self,
fields: &PlainTimeLike,
options: &OverflowOptions,
) -> Result<PlainTime, Error>
pub fn with_with_options( &self, fields: &PlainTimeLike, options: &OverflowOptions, ) -> Result<PlainTime, Error>
The with() method returns a new Temporal.PlainTime 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 PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
Sourcepub fn add_with_duration_like(
&self,
duration: &DurationLike,
) -> Result<PlainTime, Error>
pub fn add_with_duration_like( &self, duration: &DurationLike, ) -> Result<PlainTime, Error>
The add() method taking a duration property bag.
§Errors
Throws a TypeError if no duration field is set; otherwise infallible.
Source§impl PlainTime
impl PlainTime
Sourcepub fn subtract_with_duration_like(
&self,
duration: &DurationLike,
) -> Result<PlainTime, Error>
pub fn subtract_with_duration_like( &self, duration: &DurationLike, ) -> Result<PlainTime, Error>
The subtract() method taking a duration property bag.
§Errors
Throws a TypeError if no duration field is set; otherwise infallible.
Source§impl PlainTime
impl PlainTime
Sourcepub fn subtract_with_str(&self, duration: &str) -> Result<PlainTime, RangeError>
pub fn subtract_with_str(&self, duration: &str) -> Result<PlainTime, RangeError>
The subtract() method taking an ISO 8601 duration string.
§Errors
Throws a RangeError if the string is not a valid duration; otherwise infallible.
Source§impl PlainTime
impl PlainTime
Sourcepub fn add_with_str(&self, duration: &str) -> Result<PlainTime, RangeError>
pub fn add_with_str(&self, duration: &str) -> Result<PlainTime, RangeError>
The add() method taking an ISO 8601 duration string.
§Errors
Throws a RangeError if the string is not a valid duration; otherwise infallible.
Source§impl PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
Sourcepub fn until_with_options(
&self,
other: &PlainTime,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn until_with_options( &self, other: &PlainTime, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The until() method returns a Temporal.Duration representing the duration
from this time until other.
§Errors
Throws a RangeError if options specify calendar units or are otherwise invalid.
Source§impl PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
Sourcepub fn until_with_plain_date_time(&self, other: &PlainDateTime) -> Duration
pub fn until_with_plain_date_time(&self, other: &PlainDateTime) -> Duration
The until() method taking a Temporal.PlainDateTime.
Source§impl PlainTime
impl PlainTime
Sourcepub fn until_with_plain_date_time_and_options(
&self,
other: &PlainDateTime,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn until_with_plain_date_time_and_options( &self, other: &PlainDateTime, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The until() method taking a Temporal.PlainDateTime and options; see PlainTime::until_with_options
for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn until_with_zoned_date_time(&self, other: &ZonedDateTime) -> Duration
pub fn until_with_zoned_date_time(&self, other: &ZonedDateTime) -> Duration
The until() method taking a Temporal.ZonedDateTime.
Source§impl PlainTime
impl PlainTime
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 PlainTime::until_with_options
for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn until_with_plain_time_like(
&self,
other: &PlainTimeLike,
) -> Result<Duration, Error>
pub fn until_with_plain_time_like( &self, other: &PlainTimeLike, ) -> Result<Duration, Error>
The until() method taking a property bag; throws a TypeError if required fields are missing.
Source§impl PlainTime
impl PlainTime
Sourcepub fn until_with_plain_time_like_and_options(
&self,
other: &PlainTimeLike,
options: &DifferenceOptions,
) -> Result<Duration, Error>
pub fn until_with_plain_time_like_and_options( &self, other: &PlainTimeLike, options: &DifferenceOptions, ) -> Result<Duration, Error>
The until() method taking a property bag and options; throws a TypeError if required
fields are missing. See PlainTime::until_with_options for the remaining errors.
Source§impl PlainTime
impl PlainTime
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.
Source§impl PlainTime
impl PlainTime
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 PlainTime::until_with_options
for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn since_with_options(
&self,
other: &PlainTime,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn since_with_options( &self, other: &PlainTime, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The since() method returns a Temporal.Duration representing the duration
from other until this time.
§Errors
Throws a RangeError if options specify calendar units or are otherwise invalid.
Source§impl PlainTime
impl PlainTime
Sourcepub fn round(&self, round_to: &RoundToOptions) -> Result<PlainTime, RangeError>
pub fn round(&self, round_to: &RoundToOptions) -> Result<PlainTime, RangeError>
The round() method returns a new Temporal.PlainTime object with the
time rounded to the given unit.
§Errors
Throws a RangeError if smallestUnit is not provided or specifies calendar units,
or if roundingIncrement is invalid for the unit.
Source§impl PlainTime
impl PlainTime
Sourcepub fn since_with_plain_date_time(&self, other: &PlainDateTime) -> Duration
pub fn since_with_plain_date_time(&self, other: &PlainDateTime) -> Duration
The since() method taking a Temporal.PlainDateTime.
Source§impl PlainTime
impl PlainTime
Sourcepub fn since_with_plain_date_time_and_options(
&self,
other: &PlainDateTime,
options: &DifferenceOptions,
) -> Result<Duration, RangeError>
pub fn since_with_plain_date_time_and_options( &self, other: &PlainDateTime, options: &DifferenceOptions, ) -> Result<Duration, RangeError>
The since() method taking a Temporal.PlainDateTime and options; see PlainTime::since_with_options
for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn since_with_zoned_date_time(&self, other: &ZonedDateTime) -> Duration
pub fn since_with_zoned_date_time(&self, other: &ZonedDateTime) -> Duration
The since() method taking a Temporal.ZonedDateTime.
Source§impl PlainTime
impl PlainTime
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 PlainTime::since_with_options
for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn since_with_plain_time_like(
&self,
other: &PlainTimeLike,
) -> Result<Duration, Error>
pub fn since_with_plain_time_like( &self, other: &PlainTimeLike, ) -> Result<Duration, Error>
The since() method taking a property bag; throws a TypeError if required fields are missing.
Source§impl PlainTime
impl PlainTime
Sourcepub fn since_with_plain_time_like_and_options(
&self,
other: &PlainTimeLike,
options: &DifferenceOptions,
) -> Result<Duration, Error>
pub fn since_with_plain_time_like_and_options( &self, other: &PlainTimeLike, options: &DifferenceOptions, ) -> Result<Duration, Error>
The since() method taking a property bag and options; throws a TypeError if required
fields are missing. See PlainTime::since_with_options for the remaining errors.
Source§impl PlainTime
impl PlainTime
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.
Source§impl PlainTime
impl PlainTime
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 PlainTime::since_with_options
for errors.
Source§impl PlainTime
impl PlainTime
Sourcepub fn round_with_unit(
&self,
smallest_unit: Unit,
) -> Result<PlainTime, RangeError>
pub fn round_with_unit( &self, smallest_unit: Unit, ) -> Result<PlainTime, RangeError>
Shorthand for round() with only smallestUnit set.
Source§impl PlainTime
impl PlainTime
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 time.
§Errors
Throws a RangeError if locales is invalid.
Source§impl PlainTime
impl PlainTime
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 PlainTime::to_locale_string for errors.
Source§impl PlainTime
impl PlainTime
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 PlainTime::to_locale_string for errors.
Source§impl PlainTime
impl PlainTime
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 PlainTime::to_locale_string for the
remaining errors.
Source§impl PlainTime
impl PlainTime
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 PlainTime::to_locale_string for the remaining errors.
Source§impl PlainTime
impl PlainTime
Source§impl PlainTime
impl PlainTime
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 time.
Source§impl PlainTime
impl PlainTime
Sourcepub fn to_js_string_with_options(
&self,
options: &ToStringPrecisionOptions,
) -> Result<JsString, RangeError>
pub fn to_js_string_with_options( &self, options: &ToStringPrecisionOptions, ) -> Result<JsString, RangeError>
The toString() method returns an RFC 9557 string representation of this 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§
impl Eq for PlainTime
Source§impl ErasableGeneric for PlainTime
impl ErasableGeneric for PlainTime
Source§impl FromWasmAbi for PlainTime
impl FromWasmAbi for PlainTime
Source§impl IntoJsGeneric for PlainTime
impl IntoJsGeneric for PlainTime
Source§impl IntoWasmAbi for PlainTime
impl IntoWasmAbi for PlainTime
Source§impl<'__wbg_ref> IntoWasmAbi for &'__wbg_ref PlainTime
impl<'__wbg_ref> IntoWasmAbi for &'__wbg_ref PlainTime
Source§impl JsCast for PlainTime
impl JsCast for PlainTime
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 PlainTime
impl LongRefFromWasmAbi for PlainTime
Source§impl NullableFromWasmAbi for PlainTime
impl NullableFromWasmAbi for PlainTime
Source§impl NullableIntoWasmAbi for PlainTime
impl NullableIntoWasmAbi for PlainTime
Source§impl<'__wbg_ref> NullableIntoWasmAbi for &'__wbg_ref PlainTime
impl<'__wbg_ref> NullableIntoWasmAbi for &'__wbg_ref PlainTime
Source§impl OptionFromWasmAbi for PlainTime
impl OptionFromWasmAbi for PlainTime
Source§impl OptionIntoWasmAbi for PlainTime
impl OptionIntoWasmAbi for PlainTime
Source§impl<'__wbg_ref> OptionIntoWasmAbi for &'__wbg_ref PlainTime
impl<'__wbg_ref> OptionIntoWasmAbi for &'__wbg_ref PlainTime
Source§impl Ord for PlainTime
impl Ord for PlainTime
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for PlainTime
impl PartialOrd for PlainTime
Source§impl Promising for PlainTime
impl Promising for PlainTime
Source§type Resolution = PlainTime
type Resolution = PlainTime
Source§impl RefFromWasmAbi for PlainTime
impl RefFromWasmAbi for PlainTime
Source§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self are recovered from.Source§type Anchor = ManuallyDrop<PlainTime>
type Anchor = ManuallyDrop<PlainTime>
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<PlainTime> for JsValue
impl UpcastFrom<PlainTime> for JsOption<JsValue>
impl UpcastFrom<PlainTime> for JsNullable<JsValue>
impl<__UpcastWrapTarget> UpcastFrom<PlainTime> for Option<__UpcastWrapTarget>where
__UpcastWrapTarget: UpcastFrom<PlainTime>,
impl<__UpcastWrapTarget> UpcastFrom<PlainTime> for Nullable<__UpcastWrapTarget>where
__UpcastWrapTarget: UpcastFrom<PlainTime>,
impl UpcastFrom<PlainTime> for PlainTime
impl UpcastFrom<PlainTime> for JsOption<PlainTime>
impl UpcastFrom<PlainTime> for JsNullable<PlainTime>
impl UpcastFrom<PlainTime> for Object
impl UpcastFrom<PlainTime> for JsOption<Object>
impl UpcastFrom<PlainTime> for JsNullable<Object>
Source§impl VectorRefIntoWasmAbi for PlainTime
impl VectorRefIntoWasmAbi for PlainTime
fn slice_into_abi(slice: &[Self]) -> WasmSlice
impl VectorRefIntoWasmAbiSealed for PlainTime
Auto Trait Implementations§
impl Forget for PlainTime
impl Freeze for PlainTime
impl Move for PlainTime
impl RefUnwindSafe for PlainTime
impl Send for PlainTime
impl Sync for PlainTime
impl Unpin for PlainTime
impl UnsafeUnpin for PlainTime
impl UnwindSafe for PlainTime
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.