pub struct GCPlatform;
Implementations§
Source§impl GCPlatform
impl GCPlatform
Sourcepub fn initialize()
pub fn initialize()
Initializes global state for GC.
Examples found in repository?
examples/simple.rs (line 34)
33fn main() {
34 GCPlatform::initialize();
35
36 let mut heap = Heap::new(None);
37
38 let mut head = heap.allocate(Node {next: None,value: 0i32 });
39 head.next = Some(heap.allocate(Node {next: None, value: 1}));
40 heap.gc();
41
42 println!("{:p}",&head);
43 head.next = None;
44 heap.gc();
45 println!("{:p}", &head);
46}
pub unsafe fn initialize_wasm(_gc_info_table_mem: &'static mut [u8; 393216])
Auto Trait Implementations§
impl Freeze for GCPlatform
impl RefUnwindSafe for GCPlatform
impl Send for GCPlatform
impl Sync for GCPlatform
impl Unpin for GCPlatform
impl UnwindSafe for GCPlatform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more