#[repr(C)]pub struct Template(_);
Expand description
The superclass of object and function templates.
Implementations
sourceimpl Template
impl Template
sourcepub fn set(&self, key: Local<'_, Name>, value: Local<'_, Data>)
pub fn set(&self, key: Local<'_, Name>, value: Local<'_, Data>)
Adds a property to each instance created by this template.
sourcepub fn set_with_attr(
&self,
key: Local<'_, Name>,
value: Local<'_, Data>,
attr: PropertyAttribute
)
pub fn set_with_attr(
&self,
key: Local<'_, Name>,
value: Local<'_, Data>,
attr: PropertyAttribute
)
Adds a property to each instance created by this template with the specified property attributes.
Methods from Deref<Target = Data>
sourcepub fn is_big_int(&self) -> bool
pub fn is_big_int(&self) -> bool
Returns true if this data is a BigInt
.
sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Returns true if this data is a Boolean
.
sourcepub fn is_context(&self) -> bool
pub fn is_context(&self) -> bool
Returns true if this data is a Context
.
sourcepub fn is_fixed_array(&self) -> bool
pub fn is_fixed_array(&self) -> bool
Returns true if this data is a FixedArray
.
sourcepub fn is_function_template(&self) -> bool
pub fn is_function_template(&self) -> bool
Returns true if this data is a FunctionTemplate
.
sourcepub fn is_module_request(&self) -> bool
pub fn is_module_request(&self) -> bool
Returns true if this data is a ModuleRequest
.
sourcepub fn is_object_template(&self) -> bool
pub fn is_object_template(&self) -> bool
Returns true if this data is a ObjectTemplate
.
sourcepub fn is_primitive(&self) -> bool
pub fn is_primitive(&self) -> bool
Returns true if this data is a Primitive
.
sourcepub fn is_private(&self) -> bool
pub fn is_private(&self) -> bool
Returns true if this data is a Private
.
Trait Implementations
sourceimpl<'s> PartialEq<Data> for Template
impl<'s> PartialEq<Data> for Template
sourceimpl<'s> PartialEq<FunctionTemplate> for Template
impl<'s> PartialEq<FunctionTemplate> for Template
sourcefn eq(&self, other: &FunctionTemplate) -> bool
fn eq(&self, other: &FunctionTemplate) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl<'s> PartialEq<ObjectTemplate> for Template
impl<'s> PartialEq<ObjectTemplate> for Template
sourcefn eq(&self, other: &ObjectTemplate) -> bool
fn eq(&self, other: &ObjectTemplate) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl<'s> PartialEq<Template> for Data
impl<'s> PartialEq<Template> for Data
sourceimpl<'s> PartialEq<Template> for FunctionTemplate
impl<'s> PartialEq<Template> for FunctionTemplate
sourceimpl<'s> PartialEq<Template> for ObjectTemplate
impl<'s> PartialEq<Template> for ObjectTemplate
sourceimpl<'s> PartialEq<Template> for Template
impl<'s> PartialEq<Template> for Template
impl Eq for Template
Auto Trait Implementations
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnwindSafe for Template
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more