pub struct Selection<F>(/* private fields */);Expand description
Where a Dispatch caches its host-selected kernel.
Only Dispatch::get writes it, and only with a kernel the host supports,
so safe code cannot plant a kernel that skips the host check.
Each Selection must belong to exactly one Dispatch. Two dispatches
sharing one is still sound, but the second returns the first’s kernel.
dispatch! creates a private one per dispatch.
Implementations§
Auto Trait Implementations§
impl<F> !Freeze for Selection<F>
impl<F> RefUnwindSafe for Selection<F>where
OnceLock<F>: RefUnwindSafe,
impl<F> Send for Selection<F>
impl<F> Sync for Selection<F>
impl<F> Unpin for Selection<F>
impl<F> UnsafeUnpin for Selection<F>where
OnceLock<F>: UnsafeUnpin,
impl<F> UnwindSafe for Selection<F>where
OnceLock<F>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more