Struct js::rust::Runtime
[−]
[src]
pub struct Runtime { /* fields omitted */ }A wrapper for the JSRuntime and JSContext structures in SpiderMonkey.
Methods
impl Runtime[src]
pub fn get() -> *mut JSContext[src]
Get the JSContext for this thread.
pub fn new() -> Result<Runtime, ()>[src]
Creates a new JSRuntime and JSContext.
pub fn rt(&self) -> *mut JSRuntime[src]
Returns the JSRuntime object.
pub fn cx(&self) -> *mut JSContext[src]
Returns the JSContext object.
pub fn evaluate_script(
&self,
glob: HandleObject,
script: &str,
filename: &str,
line_num: u32,
rval: MutableHandleValue
) -> Result<(), ()>[src]
&self,
glob: HandleObject,
script: &str,
filename: &str,
line_num: u32,
rval: MutableHandleValue
) -> Result<(), ()>