Struct mozjs::rust::CustomAutoRooterGuard
[−]
[src]
pub struct CustomAutoRooterGuard<'a, T: 'a + CustomTrace> { /* fields omitted */ }
An RAII guard used to root underlying data in CustomAutoRooter
until the
guard is dropped (falls out of scope).
The underlying data can be accessed through this guard via its Deref and
DerefMut implementations.
This structure is created by root
method on CustomAutoRooter
or
by the auto_root!
macro.
Methods
impl<'a, T: 'a + CustomTrace> CustomAutoRooterGuard<'a, T>
[src]
pub fn new(cx: *mut JSContext, rooter: &'a mut CustomAutoRooter<T>) -> Self
[src]
pub fn handle(&self) -> Handle<T> where
T: RootKind,
[src]
T: RootKind,
pub fn handle_mut(&mut self) -> MutableHandle<T> where
T: RootKind,
[src]
T: RootKind,
Trait Implementations
impl<'a, T: 'a + CustomTrace> Deref for CustomAutoRooterGuard<'a, T>
[src]
type Target = T
The resulting type after dereferencing.
fn deref(&self) -> &T
[src]
Dereferences the value.