[−][src]Struct rquickjs::context::Ctx
A context in use, passed to Context::with
.
Methods
impl<'js> Ctx<'js>
[src]
pub fn eval<V: FromJs<'js>, S: Into<Vec<u8>>>(self, source: S) -> Result<V>
[src]
Evaluate a script in global context
pub fn compile<Sa, Sb>(self, source: Sa, name: Sb) -> Result<Module<'js>> where
Sa: Into<Vec<u8>>,
Sb: Into<Vec<u8>>,
[src]
Sa: Into<Vec<u8>>,
Sb: Into<Vec<u8>>,
Compile a module for later use.
pub fn coerce_string(self, v: Value<'js>) -> Result<String<'js>>
[src]
pub fn coerce_i32(self, v: Value<'js>) -> Result<i32>
[src]
pub fn coerce_i64(self, v: Value<'js>) -> Result<i64>
[src]
pub fn coerce_u64(self, v: Value<'js>) -> Result<u64>
[src]
pub fn coerce_f64(self, v: Value<'js>) -> Result<f64>
[src]
pub fn coerce_bool(self, v: Value<'js>) -> Result<bool>
[src]
pub fn globals(self) -> Object<'js>
[src]
Get the global object of this context
Trait Implementations
Auto Trait Implementations
impl<'js> !RefUnwindSafe for Ctx<'js>
impl<'js> !Send for Ctx<'js>
impl<'js> !Sync for Ctx<'js>
impl<'js> Unpin for Ctx<'js>
impl<'js> UnwindSafe for Ctx<'js>
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,