1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
mod gc;
mod gc_store;
mod no_trace;
mod root;
mod store;
#[cfg(test)]
mod tests;
pub use ::gc::collect;
pub use derive::*;
pub mod raw {
pub use crate::root::Reroot;
pub use crate::store::*;
pub use gc::{alloc, alloc_unmanaged, manage, GcPtr, Root};
pub use gc::{count_managed_objects, count_roots};
pub use gc::{NullTrace, Trace};
}
pub use self::gc::*;
pub use self::gc_store::*;
pub use self::no_trace::*;
pub use self::root::{HeapRoot, Root};
pub trait Finalize {
fn finalize(&mut self);
}
pub unsafe trait UnsafeFinalize {
fn finalize(&mut self);
}
impl<T: UnsafeFinalize + ?Sized> Finalize for T {
fn finalize(&mut self) {
UnsafeFinalize::finalize(self)
}
}
pub trait GC<'root>: crate::raw::Reroot<'root> + crate::raw::Trace {}