[−][src]Struct rusty_v8::ObjectTemplate
An ObjectTemplate is used to create objects at runtime.
Properties added to an ObjectTemplate are added to each object created from the ObjectTemplate.
Implementations
impl ObjectTemplate
[src]
pub fn new<'s>(scope: &mut HandleScope<'s, ()>) -> Local<'s, ObjectTemplate>
[src]
Creates an object template.
pub fn new_from_template<'s>(
scope: &mut HandleScope<'s, ()>,
templ: Local<FunctionTemplate>
) -> Local<'s, ObjectTemplate>
[src]
scope: &mut HandleScope<'s, ()>,
templ: Local<FunctionTemplate>
) -> Local<'s, ObjectTemplate>
Creates an object template from a function template.
pub fn new_instance<'s>(
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Object>>
[src]
&self,
scope: &mut HandleScope<'s>
) -> Option<Local<'s, Object>>
Creates a new instance of this object template.
Methods from Deref<Target = Template>
pub fn set(&self, key: Local<Name>, value: Local<Data>)
[src]
Adds a property to each instance created by this template.
pub fn set_with_attr(
&self,
key: Local<Name>,
value: Local<Data>,
attr: PropertyAttribute
)
[src]
&self,
key: Local<Name>,
value: Local<Data>,
attr: PropertyAttribute
)
Adds a property to each instance created by this template with the specified property attributes.
Trait Implementations
impl Deref for ObjectTemplate
[src]
impl Eq for ObjectTemplate
[src]
impl Hash for ObjectTemplate
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'s> PartialEq<Data> for ObjectTemplate
[src]
impl<'s> PartialEq<ObjectTemplate> for Data
[src]
fn eq(&self, other: &ObjectTemplate) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<ObjectTemplate> for Template
[src]
fn eq(&self, other: &ObjectTemplate) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<ObjectTemplate> for ObjectTemplate
[src]
fn eq(&self, other: &ObjectTemplate) -> bool
[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<'s> PartialEq<Template> for ObjectTemplate
[src]
Auto Trait Implementations
impl RefUnwindSafe for ObjectTemplate
impl Send for ObjectTemplate
impl Sync for ObjectTemplate
impl Unpin for ObjectTemplate
impl UnwindSafe for ObjectTemplate
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,