mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-12-26 09:13:46 -05:00
docs: add note how to create a v8::Local out of v8::Global (#1113)
This commit is contained in:
parent
7091248630
commit
b8d7925774
1 changed files with 3 additions and 0 deletions
|
@ -151,6 +151,9 @@ impl<'s, T> Deref for Local<'s, T> {
|
||||||
/// A global handle contains a reference to a storage cell within
|
/// A global handle contains a reference to a storage cell within
|
||||||
/// the V8 engine which holds an object value and which is updated by
|
/// the V8 engine which holds an object value and which is updated by
|
||||||
/// the garbage collector whenever the object is moved.
|
/// the garbage collector whenever the object is moved.
|
||||||
|
///
|
||||||
|
/// You can create a `v8::Local` out of `v8::Global` using
|
||||||
|
/// `v8::Local::new(scope, global_handle)`.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Global<T> {
|
pub struct Global<T> {
|
||||||
data: NonNull<T>,
|
data: NonNull<T>,
|
||||||
|
|
Loading…
Reference in a new issue