pub struct Lock<'cx, C> { /* private fields */ }
Expand description
A temporary lock of an execution context.
While a lock is alive, no JavaScript code can be executed in the execution context.
Values that support the Borrow
trait may be dynamically borrowed by passing a
Lock
.
Implementations§
source§impl<'a: 'cx, 'cx, C> Lock<'cx, C>where
C: Context<'a>,
impl<'a: 'cx, 'cx, C> Lock<'cx, C>where C: Context<'a>,
sourcepub fn new(cx: &'cx mut C) -> Lock<'cx, C>
pub fn new(cx: &'cx mut C) -> Lock<'cx, C>
Constructs a new Lock
and locks the VM. See also Context::lock
.