pub trait ContextExt: IsA<Context> + Sealed + 'static {
Show 14 methods // Provided methods fn check_syntax( &self, code: &str, mode: CheckSyntaxMode, uri: &str, line_number: u32 ) -> (CheckSyntaxResult, Exception) { ... } fn clear_exception(&self) { ... } fn evaluate(&self, code: &str) -> Option<Value> { ... } fn evaluate_with_source_uri( &self, code: &str, uri: &str, line_number: u32 ) -> Option<Value> { ... } fn exception(&self) -> Option<Exception> { ... } fn global_object(&self) -> Option<Value> { ... } fn value(&self, name: &str) -> Option<Value> { ... } fn virtual_machine(&self) -> Option<VirtualMachine> { ... } fn pop_exception_handler(&self) { ... } fn push_exception_handler<P: Fn(&Context, &Exception) + 'static>( &self, handler: P ) { ... } fn set_value(&self, name: &str, value: &impl IsA<Value>) { ... } fn throw(&self, error_message: &str) { ... } fn throw_exception(&self, exception: &impl IsA<Exception>) { ... } fn throw_with_name(&self, error_name: &str, error_message: &str) { ... }
}

Provided Methods§

source

fn check_syntax( &self, code: &str, mode: CheckSyntaxMode, uri: &str, line_number: u32 ) -> (CheckSyntaxResult, Exception)

source

fn clear_exception(&self)

source

fn evaluate(&self, code: &str) -> Option<Value>

source

fn evaluate_with_source_uri( &self, code: &str, uri: &str, line_number: u32 ) -> Option<Value>

source

fn exception(&self) -> Option<Exception>

source

fn global_object(&self) -> Option<Value>

source

fn value(&self, name: &str) -> Option<Value>

source

fn virtual_machine(&self) -> Option<VirtualMachine>

source

fn pop_exception_handler(&self)

source

fn push_exception_handler<P: Fn(&Context, &Exception) + 'static>( &self, handler: P )

source

fn set_value(&self, name: &str, value: &impl IsA<Value>)

source

fn throw(&self, error_message: &str)

source

fn throw_exception(&self, exception: &impl IsA<Exception>)

source

fn throw_with_name(&self, error_name: &str, error_message: &str)

Object Safety§

This trait is not object safe.

Implementors§