[][src]Trait hulunbuir::Keep

pub trait Keep {
    fn with_keep<F: FnMut(&[Address])>(&self, keep: F);
}

Required trait for managed objects' type.

Required methods

fn with_keep<F: FnMut(&[Address])>(&self, keep: F)

When this method is called, it should calls back keep with a slice of addresses, the objects at which are "kept" by current object. If current object is considered as alive in a garbage collecting pass (probably since this method is called), then all the kept objects will also be considered as alive.

If this method is not implemented properly, such as not calling keep or calling it with insufficient addresses, Memory::InvalidAddress may be thrown in arbitrary time in the future.

There's no reason for this method to fail. Please panic if you have to.

Loading content...

Implementors

impl<T: Keep> Keep for Slot<T>[src]

Loading content...