[−]Struct qjs::RuntimeRef
A borrowed reference to a Runtime
.
Methods
impl RuntimeRef
[src]
impl RuntimeRef
[src]
pub fn new_class(&self, class_id: ClassId, class_def: &ClassDef) -> bool
[src]
Register a new Javascript class.
pub fn is_registered_class(&self, class_id: ClassId) -> bool
[src]
Checks if a class ID has been registered.
impl RuntimeRef
[src]
pub fn is_job_pending(&self) -> bool
[src]
pub fn execute_pending_job(&self) -> Result<Option<&ContextRef>, Error>
[src]
impl RuntimeRef
[src]
pub fn set_module_loader<T>(
&self,
module_normalize: ModuleNormalizeFunc,
module_loader: ModuleLoaderFunc,
opaque: Option<NonNull<T>>
)
[src]
&self,
module_normalize: ModuleNormalizeFunc,
module_loader: ModuleLoaderFunc,
opaque: Option<NonNull<T>>
)
Set the module loader and normalizer functions.
impl RuntimeRef
[src]
pub fn set_memory_limit(&self, limit: Option<usize>) -> &Self
[src]
Set a global memory allocation limit to a given Runtime
.
pub fn set_gc_threshold(&self, gc_threshold: usize) -> &Self
[src]
Set the GC threshold to a given Runtime
.
pub fn run_gc(&self)
[src]
Force to run GC to a given Runtime
.
pub fn is_live_object(&self, obj: &Value) -> bool
[src]
pub fn is_gc_swap(&self) -> bool
[src]
pub fn memory_usage(&self) -> MemoryUsage
[src]
Compute memory used by various object types.
pub fn set_interrupt_handler(&self, handler: InterruptHandler)
[src]
Set a callback which is regularly called by the engine when it is executing code.
This callback can be used to implement an execution timeout.
impl RuntimeRef
[src]
pub fn std_free_handlers(&self)
[src]
impl RuntimeRef
[src]
pub fn free_value(&self, v: Value)
[src]
Trait Implementations
impl Send for RuntimeRef
impl AsMut<RuntimeRef> for Runtime
fn as_mut(&mut self) -> &mut RuntimeRef
impl PartialEq<RuntimeRef> for Runtime
[src]
fn eq(&self, other: &RuntimeRef) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<RuntimeRef> for RuntimeRef
[src]
fn eq(&self, other: &RuntimeRef) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl PartialEq<Runtime> for RuntimeRef
[src]
fn eq(&self, other: &Runtime) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl AsRef<RuntimeRef> for Runtime
fn as_ref(&self) -> &RuntimeRef
impl Debug for RuntimeRef
[src]
impl Borrow<RuntimeRef> for Runtime
fn borrow(&self) -> &RuntimeRef
impl BorrowMut<RuntimeRef> for Runtime
fn borrow_mut(&mut self) -> &mut RuntimeRef
impl ForeignTypeRef for RuntimeRef
type CType = JSRuntime
The raw C type.
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
[src]
Constructs a shared instance of this type from its raw type.
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
[src]
Constructs a mutable reference of this type from its raw type.
fn as_ptr(&self) -> *mut Self::CType
[src]
Returns a raw pointer to the wrapped value.
Auto Trait Implementations
impl Unpin for RuntimeRef
impl !Sync for RuntimeRef
impl UnwindSafe for RuntimeRef
impl !RefUnwindSafe for RuntimeRef
Blanket Implementations
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,