#[repr(C)]pub struct HandleScope<'s, C = Context> { /* private fields */ }Expand description
A stack-allocated class that governs a number of local handles. After a handle scope has been created, all local handles will be allocated within that handle scope until either the handle scope is deleted or another handle scope is created. If there is already a handle scope and a new one is created, all allocations will take place in the new handle scope until it is deleted. After that, new handles will again be allocated in the original handle scope.
After the handle scope of a local handle has been deleted the garbage collector will no longer track the object stored in the handle and may deallocate it. The behavior of accessing a handle for which the handle scope has been deleted is undefined.
Implementations§
Source§impl<'s> HandleScope<'s>
impl<'s> HandleScope<'s>
pub fn new<P: NewHandleScope<'s>>(scope: &'s mut P) -> ScopeStorage<P::NewScope>
Trait Implementations§
Auto Trait Implementations§
impl<'s, C = Context> !Freeze for HandleScope<'s, C>
impl<'s, C = Context> !RefUnwindSafe for HandleScope<'s, C>
impl<'s, C = Context> !Send for HandleScope<'s, C>
impl<'s, C = Context> !Sync for HandleScope<'s, C>
impl<'s, C = Context> !Unpin for HandleScope<'s, C>
impl<'s, C = Context> !UnwindSafe for HandleScope<'s, C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more