#[non_exhaustive]pub enum JsClass {
Array,
Function,
Date,
RegExp,
Map,
Set,
Error,
ArrayBuffer,
View(&'static str),
Object,
}Expand description
What class of object a JS object is, as Object.prototype.toString
tells built-in objects apart (JsIn::class): what checks of equality
compare by (nsh/test’s toEqual).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Array
An array.
Function
A function.
Date
A Date.
RegExp
A RegExp.
Map
A Map.
Set
A Set.
Error
An error (an Error or one of its subclasses).
ArrayBuffer
An ArrayBuffer.
View(&'static str)
A typed array or a DataView, named by its class ("Uint8Array",
"DataView").
Object
Any other object: a plain object, an instance of a class, …
Trait Implementations§
impl Copy for JsClass
impl Eq for JsClass
impl StructuralPartialEq for JsClass
Auto Trait Implementations§
impl Forget for JsClass
impl Freeze for JsClass
impl Move for JsClass
impl RefUnwindSafe for JsClass
impl Send for JsClass
impl Sync for JsClass
impl Unpin for JsClass
impl UnsafeUnpin for JsClasswhere
&'static str: UnsafeUnpin,
impl UnwindSafe for JsClasswhere
&'static str: UnwindSafe,
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
Mutably borrows from an owned value. Read more