pub enum ObjectType {
Ordinary(Box<dyn JsObject>),
Function(Box<dyn JsFunctionObject>),
}Variants§
Implementations§
Source§impl ObjectType
impl ObjectType
pub fn is_callable(&self) -> bool
pub fn is_constructor(&self) -> bool
pub fn as_js_object(&self) -> &dyn JsObject
pub fn as_js_object_mut(&mut self) -> &mut dyn JsObject
pub fn as_js_function_object(&self) -> &dyn JsFunctionObject
pub fn as_js_function_object_mut(&mut self) -> &mut dyn JsFunctionObject
Trait Implementations§
Source§impl Display for ObjectType
impl Display for ObjectType
Source§impl PartialEq for ObjectType
impl PartialEq for ObjectType
Auto Trait Implementations§
impl Freeze for ObjectType
impl !RefUnwindSafe for ObjectType
impl !Send for ObjectType
impl !Sync for ObjectType
impl Unpin for ObjectType
impl !UnwindSafe for ObjectType
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