mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-01-23 07:29:56 -05:00
Move docs for global to struct (#127)
This commit is contained in:
parent
1507a897de
commit
b00ef1ea3c
1 changed files with 8 additions and 8 deletions
|
@ -20,14 +20,6 @@ extern "C" {
|
|||
);
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
pub struct Global<T> {
|
||||
value: Option<NonNull<T>>,
|
||||
isolate: Option<NonNull<Isolate>>,
|
||||
}
|
||||
|
||||
unsafe impl<T> Send for Global<T> {}
|
||||
|
||||
/// An object reference that is independent of any handle scope. Where
|
||||
/// a Local handle only lives as long as the HandleScope in which it was
|
||||
/// allocated, a global handle remains valid until it is explicitly
|
||||
|
@ -38,6 +30,14 @@ unsafe impl<T> Send for Global<T> {}
|
|||
/// the garbage collector whenever the object is moved. A new storage
|
||||
/// cell can be created using the constructor or Global::set and
|
||||
/// existing handles can be disposed using Global::reset.
|
||||
#[repr(C)]
|
||||
pub struct Global<T> {
|
||||
value: Option<NonNull<T>>,
|
||||
isolate: Option<NonNull<Isolate>>,
|
||||
}
|
||||
|
||||
unsafe impl<T> Send for Global<T> {}
|
||||
|
||||
impl<T> Global<T> {
|
||||
/// Construct a Global with no storage cell.
|
||||
pub fn new() -> Self {
|
||||
|
|
Loading…
Add table
Reference in a new issue