pub unsafe trait Bound<'gc> {
type Rebound;
}Expand description
Trait which indicates a Gc’d object who’s lifetimes can be rebound.
§Safety
Implementor must ensure that the associated types only change the approriate lifetimes:
Bound::Rebound only changes the ’gc.
§Example
use dreck::{Gc,Bound};
pub struct Container<'gc,'own>(Gc<'gc,'own, String>);
unsafe impl<'from,'own,'to> Bound<'to> for Container<'from,'own>{
// Change the 'from lifetime into 'to
type Rebound = Container<'to,'own>;
}