pub trait Target<'target>: TargetPriv<'target> {
// Provided methods
fn unrooted(&self) -> Unrooted<'target> { ... }
fn local_scope<T, F, const M: usize>(&self, func: F) -> JlrsResult<T>
where for<'inner> F: FnOnce(LocalGcFrame<'inner, M>) -> JlrsResult<T> { ... }
fn with_local_scope<T, F, const M: usize>(self, func: F) -> JlrsResult<T>
where for<'inner> F: FnOnce(Self, LocalGcFrame<'inner, M>) -> JlrsResult<T> { ... }
fn into_extended_target<'borrow, 'current>(
self,
frame: &'borrow mut GcFrame<'current>
) -> ExtendedTarget<'target, 'current, 'borrow, Self> { ... }
fn into_extended_async_target<'borrow, 'current>(
self,
frame: &'borrow mut AsyncGcFrame<'current>
) -> ExtendedAsyncTarget<'target, 'current, 'borrow, Self> { ... }
}
Expand description
Trait implemented by all targets.
For more information see the module-level docs.
Provided Methods§
sourcefn local_scope<T, F, const M: usize>(&self, func: F) -> JlrsResult<T>
fn local_scope<T, F, const M: usize>(&self, func: F) -> JlrsResult<T>
Create a new local scope and call func
.
The LocalGcFrame
provided to func
has capacity for M
roots.
sourcefn with_local_scope<T, F, const M: usize>(self, func: F) -> JlrsResult<T>
fn with_local_scope<T, F, const M: usize>(self, func: F) -> JlrsResult<T>
Create a new local scope and call func
.
The LocalGcFrame
provided to func
has capacity for M
roots, self
is propagated to
the closure.
sourcefn into_extended_target<'borrow, 'current>(
self,
frame: &'borrow mut GcFrame<'current>
) -> ExtendedTarget<'target, 'current, 'borrow, Self>
fn into_extended_target<'borrow, 'current>( self, frame: &'borrow mut GcFrame<'current> ) -> ExtendedTarget<'target, 'current, 'borrow, Self>
Convert self
into an ExtendedTarget
.
sourcefn into_extended_async_target<'borrow, 'current>(
self,
frame: &'borrow mut AsyncGcFrame<'current>
) -> ExtendedAsyncTarget<'target, 'current, 'borrow, Self>
fn into_extended_async_target<'borrow, 'current>( self, frame: &'borrow mut AsyncGcFrame<'current> ) -> ExtendedAsyncTarget<'target, 'current, 'borrow, Self>
Convert self
into an ExtendedAsyncTarget
.
Object Safety§
This trait is not object safe.