Struct rusty_v8::FunctionBuilder [−][src]
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]
self,
constructor_behavior: ConstructorBehavior
) -> Self
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]
self,
scope: &mut HandleScope<'s, ()>
) -> Local<'s, FunctionTemplate>
Creates the function template.
Auto Trait Implementations
impl<'s, T> RefUnwindSafe for FunctionBuilder<'s, T> where
T: RefUnwindSafe,
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,
T: Unpin,
impl<'s, T> UnwindSafe for FunctionBuilder<'s, T> where
T: UnwindSafe,
T: UnwindSafe,
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,
pub 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.
pub 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>,