Trait flax::fetch::RandomFetch

source ·
pub trait RandomFetch<'q>: PreparedFetch<'q> {
    // Required methods
    unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item;
    unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item;
}
Expand description

A fetch which only yields items which can freely alias.

This makes the fetch method safer to implement and can be called with a covariant lifetime.

Required Methods§

source

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

Fetch the shared item from the given slot

§Safety

Slot must be valid

source

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

Use an existing chunk to access an arbitrary slot

§Safety

Slot must be valid

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'q> RandomFetch<'q> for ()

source§

unsafe fn fetch_shared(&'q self, _: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(_: &Self::Chunk, _: Slot) -> Self::Item

source§

impl<'q, A> RandomFetch<'q> for (A,)
where A: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

source§

impl<'q, A, B> RandomFetch<'q> for (A, B)
where A: RandomFetch<'q>, B: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

source§

impl<'q, A, B, C> RandomFetch<'q> for (A, B, C)
where A: RandomFetch<'q>, B: RandomFetch<'q>, C: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

source§

impl<'q, A, B, C, D> RandomFetch<'q> for (A, B, C, D)
where A: RandomFetch<'q>, B: RandomFetch<'q>, C: RandomFetch<'q>, D: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

source§

impl<'q, A, B, C, D, E> RandomFetch<'q> for (A, B, C, D, E)
where A: RandomFetch<'q>, B: RandomFetch<'q>, C: RandomFetch<'q>, D: RandomFetch<'q>, E: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

source§

impl<'q, A, B, C, D, E, F> RandomFetch<'q> for (A, B, C, D, E, F)
where A: RandomFetch<'q>, B: RandomFetch<'q>, C: RandomFetch<'q>, D: RandomFetch<'q>, E: RandomFetch<'q>, F: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

source§

impl<'q, A, B, C, D, E, F, H> RandomFetch<'q> for (A, B, C, D, E, F, H)
where A: RandomFetch<'q>, B: RandomFetch<'q>, C: RandomFetch<'q>, D: RandomFetch<'q>, E: RandomFetch<'q>, F: RandomFetch<'q>, H: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

source§

impl<'q, A, B, C, D, E, F, H, I> RandomFetch<'q> for (A, B, C, D, E, F, H, I)
where A: RandomFetch<'q>, B: RandomFetch<'q>, C: RandomFetch<'q>, D: RandomFetch<'q>, E: RandomFetch<'q>, F: RandomFetch<'q>, H: RandomFetch<'q>, I: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

source§

impl<'q, A, B, C, D, E, F, H, I, J> RandomFetch<'q> for (A, B, C, D, E, F, H, I, J)
where A: RandomFetch<'q>, B: RandomFetch<'q>, C: RandomFetch<'q>, D: RandomFetch<'q>, E: RandomFetch<'q>, F: RandomFetch<'q>, H: RandomFetch<'q>, I: RandomFetch<'q>, J: RandomFetch<'q>,

source§

unsafe fn fetch_shared(&'q self, slot: Slot) -> Self::Item

source§

unsafe fn fetch_shared_chunk(chunk: &Self::Chunk, slot: Slot) -> Self::Item

Implementors§

source§

impl<'q, F, V> RandomFetch<'q> for AsDeref<F>
where F: RandomFetch<'q, Item = &'q V>, V: 'static + Deref,

source§

impl<'q, V, F> RandomFetch<'q> for Cloned<F>
where F: RandomFetch<'q>, F::Item: Deref<Target = V>, V: 'static + Clone,