pub trait QueryResultsStorage {
// Required methods
fn push(&mut self, intersection: Intersection) -> bool;
fn clear(&mut self);
fn sort_intersections_by<C: FnMut(&Intersection, &Intersection) -> Ordering>(
&mut self,
cmp: C,
);
}Expand description
A trait for ray cast results storage. It has two implementations: Vec and ArrayVec. Latter is needed for the cases where you need to avoid runtime memory allocations and do everything on stack.
Required Methods§
Sourcefn push(&mut self, intersection: Intersection) -> bool
fn push(&mut self, intersection: Intersection) -> bool
Pushes new intersection in the storage. Returns true if intersection was successfully inserted, false otherwise.
Sourcefn sort_intersections_by<C: FnMut(&Intersection, &Intersection) -> Ordering>(
&mut self,
cmp: C,
)
fn sort_intersections_by<C: FnMut(&Intersection, &Intersection) -> Ordering>( &mut self, cmp: C, )
Sorts intersections by given compare function.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".