Struct rusty_v8::Template[][src]

#[repr(C)]pub struct Template(_);

The superclass of object and function templates.

Implementations

impl Template[src]

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]

Adds a property to each instance created by this template with the specified property attributes.

Methods from Deref<Target = Data>

pub fn get_hash(&self) -> int[src]

Returns the V8 hash value for this value. The current implementation uses a hidden property to store the identity hash on some object types.

The return value will never be 0. Also, it is not guaranteed to be unique.

pub fn is_value(&self) -> bool[src]

Returns true if this data is a Value.

pub fn is_module(&self) -> bool[src]

Returns true if this data is a Module.

pub fn is_private(&self) -> bool[src]

Returns true if this data is a Private.

pub fn is_object_template(&self) -> bool[src]

Returns true if this data is an ObjectTemplate

pub fn is_function_template(&self) -> bool[src]

Returns true if this data is a FunctionTemplate.

Trait Implementations

impl Debug for Template[src]

impl Deref for Template[src]

type Target = Data

The resulting type after dereferencing.

impl Eq for Template[src]

impl Hash for Template[src]

impl<'s> PartialEq<Data> for Template[src]

impl<'s> PartialEq<FunctionTemplate> for Template[src]

impl<'s> PartialEq<ObjectTemplate> for Template[src]

impl<'s> PartialEq<Template> for Data[src]

impl<'s> PartialEq<Template> for Template[src]

impl<'s> PartialEq<Template> for FunctionTemplate[src]

impl<'s> PartialEq<Template> for ObjectTemplate[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.