From b8d79257744e4323864645093eea668060ee0590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 2 Nov 2022 22:09:07 +0100 Subject: [PATCH] docs: add note how to create a v8::Local out of v8::Global (#1113) --- src/handle.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/handle.rs b/src/handle.rs index 8966fc85..d97ca023 100644 --- a/src/handle.rs +++ b/src/handle.rs @@ -151,6 +151,9 @@ impl<'s, T> Deref for Local<'s, T> { /// 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 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)] pub struct Global { data: NonNull,