Trait jlrs::memory::target::Target

source ·
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§

source

fn unrooted(&self) -> Unrooted<'target>

Returns a new Unrooted.

source

fn local_scope<T, F, const M: usize>(&self, func: F) -> JlrsResult<T>
where for<'inner> F: FnOnce(LocalGcFrame<'inner, M>) -> JlrsResult<T>,

Create a new local scope and call func.

The LocalGcFrame provided to func has capacity for M roots.

source

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>,

Create a new local scope and call func.

The LocalGcFrame provided to func has capacity for M roots, self is propagated to the closure.

source

fn into_extended_target<'borrow, 'current>( self, frame: &'borrow mut GcFrame<'current> ) -> ExtendedTarget<'target, 'current, 'borrow, Self>

Convert self into an ExtendedTarget.

source

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.

Implementations on Foreign Types§

source§

impl<'target, 'data, T> Target<'target> for &T
where T: Target<'target>,

Implementors§

source§

impl<'target> Target<'target> for &'target mut LocalOutput<'_>

source§

impl<'target> Target<'target> for &'target mut Output<'_>

source§

impl<'target> Target<'target> for &mut AsyncGcFrame<'target>

source§

impl<'target> Target<'target> for &mut GcFrame<'target>

source§

impl<'target> Target<'target> for &mut LocalReusableSlot<'target>

source§

impl<'target> Target<'target> for &mut ReusableSlot<'target>

source§

impl<'target> Target<'target> for AsyncGcFrame<'target>

source§

impl<'target> Target<'target> for GcFrame<'target>

source§

impl<'target> Target<'target> for LocalOutput<'target>

source§

impl<'target> Target<'target> for Output<'target>

source§

impl<'target> Target<'target> for ReusableSlot<'target>

source§

impl<'target> Target<'target> for Unrooted<'target>

source§

impl<'target, const N: usize> Target<'target> for &mut LocalGcFrame<'target, N>

source§

impl<'target, const N: usize> Target<'target> for LocalGcFrame<'target, N>