Struct quick_js::ContextBuilder [−][src]
A builder for Context.
Create with Context::builder.
Implementations
impl ContextBuilder
[src]
pub fn memory_limit(self, max_bytes: usize) -> Self
[src]
Sets the memory limit of the Javascript runtime (in bytes).
If the limit is exceeded, methods like eval
will return
a Err(ExecutionError::Exception(JsValue::Null))
pub fn console<B>(self, backend: B) -> Self where
B: ConsoleBackend,
[src]
B: ConsoleBackend,
Set a console handler that will proxy console.{log,trace,debug,...}
calls.
The given argument must implement the console::ConsoleBackend trait.
A very simple logger could look like this:
pub fn build(self) -> Result<Context, ContextError>
[src]
Finalize the builder and build a JS Context.
Auto Trait Implementations
impl RefUnwindSafe for ContextBuilder
impl !Send for ContextBuilder
impl !Sync for ContextBuilder
impl Unpin for ContextBuilder
impl !UnwindSafe for ContextBuilder
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>,