#[repr(C)]pub struct Env {
pub isolate_ptr: *mut OwnedIsolate,
pub open_handle_scopes: usize,
pub shared: *mut EnvShared,
pub async_work_sender: UnboundedSender<PendingNapiAsyncWork>,
pub threadsafe_function_sender: UnboundedSender<ThreadSafeFunctionStatus>,
/* private fields */
}
Fields
isolate_ptr: *mut OwnedIsolate
open_handle_scopes: usize
async_work_sender: UnboundedSender<PendingNapiAsyncWork>
threadsafe_function_sender: UnboundedSender<ThreadSafeFunctionStatus>
Implementations
sourceimpl Env
impl Env
pub fn new(
isolate_ptr: *mut OwnedIsolate,
context: Global<Context>,
sender: UnboundedSender<PendingNapiAsyncWork>,
threadsafe_function_sender: UnboundedSender<ThreadSafeFunctionStatus>
) -> Self
pub fn add_async_work(&mut self, async_work: PendingNapiAsyncWork)
pub fn isolate(&mut self) -> &mut OwnedIsolate
pub fn scope(&self) -> CallbackScope<'_>
Trait Implementations
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more