Struct oxischeme::heap::Rooted
[-]
[+]
[src]
pub struct Rooted<T> { // some fields omitted }
A smart pointer wrapping the pointer type T
. It keeps its referent rooted
while the smart pointer is in scope to prevent dangling pointers caused by a
garbage collection within the pointers lifespan. For more information see
the module level documentation about rooting.
Methods
impl<T: ToGcThing> Rooted<T>
fn new(heap: &mut Heap, ptr: T) -> Rooted<T>
Create a new Rooted<T>
, rooting the referent.
fn emplace(&mut self, rhs: T)
Unroot the current referent and replace it with the given referent, which then gets rooted.