Skip to main content

SlabPoolExt

Trait SlabPoolExt 

Source
pub trait SlabPoolExt: SlabPoolTrait {
    // Provided methods
    fn with_current_slab<R>(&self, f: impl FnOnce(&dyn SlabTrait) -> R) -> R { ... }
    fn with_owner_slab<R>(
        &self,
        cpu_idx: usize,
        f: impl FnOnce(&dyn SlabTrait) -> R,
    ) -> R { ... }
}
Expand description

Convenience helpers for callback-style slab access.

Provided Methods§

Source

fn with_current_slab<R>(&self, f: impl FnOnce(&dyn SlabTrait) -> R) -> R

Access the current CPU’s slab via a callback.

Source

fn with_owner_slab<R>( &self, cpu_idx: usize, f: impl FnOnce(&dyn SlabTrait) -> R, ) -> R

Access the given owner’s slab via a callback.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§