[−][src]Struct boa::class::ClassBuilder
Class builder which allows adding methods and static methods to the class.
Implementations
impl<'context> ClassBuilder<'context>[src]
pub fn method<N>(&mut self, name: N, length: usize, function: NativeFunction) where
N: Into<String>, [src]
N: Into<String>,
Add a method to the class.
It is added to prototype.
pub fn static_method<N>(
&mut self,
name: N,
length: usize,
function: NativeFunction
) where
N: Into<String>, [src]
&mut self,
name: N,
length: usize,
function: NativeFunction
) where
N: Into<String>,
Add a static method to the class.
It is added to class object itself.
pub fn property<K, V>(&mut self, key: K, value: V, attribute: Attribute) where
K: Into<PropertyKey>,
V: Into<Value>, [src]
K: Into<PropertyKey>,
V: Into<Value>,
Add a property to the class, with the specified attribute.
It is added to prototype.
pub fn static_property<K, V>(&mut self, key: K, value: V, attribute: Attribute) where
K: Into<PropertyKey>,
V: Into<Value>, [src]
K: Into<PropertyKey>,
V: Into<Value>,
Add a static property to the class, with the specified attribute.
It is added to class object itself.
pub fn context(&mut self) -> &mut Context[src]
Return the current context.
Trait Implementations
impl<'context> Debug for ClassBuilder<'context>[src]
Auto Trait Implementations
impl<'context> !RefUnwindSafe for ClassBuilder<'context>
impl<'context> !Send for ClassBuilder<'context>
impl<'context> !Sync for ClassBuilder<'context>
impl<'context> Unpin for ClassBuilder<'context>
impl<'context> !UnwindSafe for ClassBuilder<'context>
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,