[−][src]Trait zerogc::GcBindHandle
Trait for binding GcHandles to contexts using GcBindHandle::bind_to
This is separate from the GcHandle trait because Rust doesn't have Generic Associated Types
TODO: Remove when we get more powerful types
Required methods
pub fn bind_to(
&self,
context: &'new_gc <Self::System as GcSystem>::Context
) -> Gc<'new_gc, <T as GcBrand<'new_gc, Self::Id>>::Branded, Self::Id>
[src]
&self,
context: &'new_gc <Self::System as GcSystem>::Context
) -> Gc<'new_gc, <T as GcBrand<'new_gc, Self::Id>>::Branded, Self::Id>
Associate this handle with the specified context, allowing its underlying object to be accessed as long as the context is valid.
The underlying object can be accessed just like any other object that would be allocated from the context. It'll be properly collected and can even be used as a root at the next safepoint.