Struct rusty_v8::FunctionBuilder[][src]

pub struct FunctionBuilder<'s, T> { /* fields omitted */ }

A builder to construct the properties of a Function or FunctionTemplate.

Implementations

impl<'s, T> FunctionBuilder<'s, T>[src]

pub fn new(callback: impl MapFnTo<FunctionCallback>) -> Self[src]

Create a new FunctionBuilder.

pub fn data(self, data: Local<'s, Value>) -> Self[src]

Set the associated data. The default is no associated data.

pub fn length(self, length: i32) -> Self[src]

Set the function length. The default is 0.

pub fn constructor_behavior(
    self,
    constructor_behavior: ConstructorBehavior
) -> Self
[src]

Set the constructor behavior. The default is ConstructorBehavior::Allow.

pub fn side_effect_type(self, side_effect_type: SideEffectType) -> Self[src]

Set the side effect type. The default is SideEffectType::HasSideEffect.

impl<'s> FunctionBuilder<'s, Function>[src]

pub fn build(self, scope: &mut HandleScope<'s>) -> Option<Local<'s, Function>>[src]

Create the function in the current execution context.

impl<'s> FunctionBuilder<'s, FunctionTemplate>[src]

pub fn signature(self, signature: Local<'s, Signature>) -> Self[src]

Set the function call signature. The default is no signature.

pub fn build(
    self,
    scope: &mut HandleScope<'s, ()>
) -> Local<'s, FunctionTemplate>
[src]

Creates the function template.

Auto Trait Implementations

impl<'s, T> RefUnwindSafe for FunctionBuilder<'s, T> where
    T: RefUnwindSafe

impl<'s, T> !Send for FunctionBuilder<'s, T>

impl<'s, T> !Sync for FunctionBuilder<'s, T>

impl<'s, T> Unpin for FunctionBuilder<'s, T> where
    T: Unpin

impl<'s, T> UnwindSafe for FunctionBuilder<'s, T> where
    T: UnwindSafe

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.