pub unsafe trait Fetch<'a> {
    type Item;
    fn dangling() -> Self;
fn access(archetype: &Archetype) -> Option<Access>;
fn borrow(archetype: &Archetype);
fn new(archetype: &'a Archetype) -> Option<Self>;
fn release(archetype: &Archetype);
fn for_each_borrow(f: impl FnMut(TypeId, bool));
unsafe fn get(&self, n: usize) -> Self::Item; }
Expand description

Streaming iterators over contiguous homogeneous ranges of components

Associated Types

Type of value to be fetched

Required methods

A value on which get may never be called

How this query will access archetype, if at all

Acquire dynamic borrows from archetype

Construct a Fetch for archetype if it should be traversed

Release dynamic borrows acquired by borrow

Invoke f for every component type that may be borrowed and whether the borrow is unique

Access the nth item in this archetype without bounds checking

Safety
  • Must only be called after borrow
  • release must not be called while 'a is still live
  • Bounds-checking must be performed externally
  • Any resulting borrows must be legal (e.g. no &mut to something another iterator might access)

Implementations on Foreign Types

Implementors