[][src]Struct dinotree_alg::query::MultiRectMut

pub struct MultiRectMut<'a, 'b: 'a, A: Axis, T: Aabb> { /* fields omitted */ }

If we have two non intersecting rectangles, it is safe to return to the user two sets of mutable references of the bots strictly inside each rectangle since it is impossible for a bot to belong to both sets.

Safety

Unsafe code is used. We unsafely convert the references returned by the rect query closure to have a longer lifetime. This allows the user to store mutable references of non intersecting rectangles at the same time. If two requested rectangles intersect, an error is returned.

Handles a multi rect mut "sessions" within which the user can query multiple non intersecting rectangles.

Methods

impl<'a, 'b: 'a, A: Axis, T: Aabb> MultiRectMut<'a, 'b, A, T>[src]

pub fn new(tree: &'a mut DinoTree<'b, A, T>) -> Self[src]

pub fn for_all_in_rect_mut(
    &mut self,
    rect: Rect<T::Num>,
    func: impl FnMut(PMut<'a, T>)
) -> Result<(), RectIntersectErr>
[src]

Auto Trait Implementations

impl<'a, 'b, A, T> RefUnwindSafe for MultiRectMut<'a, 'b, A, T> where
    A: RefUnwindSafe,
    T: RefUnwindSafe,
    <T as Aabb>::Num: RefUnwindSafe

impl<'a, 'b, A, T> Send for MultiRectMut<'a, 'b, A, T> where
    T: Send,
    <T as Aabb>::Num: Send

impl<'a, 'b, A, T> Sync for MultiRectMut<'a, 'b, A, T> where
    T: Sync,
    <T as Aabb>::Num: Sync

impl<'a, 'b, A, T> Unpin for MultiRectMut<'a, 'b, A, T> where
    <T as Aabb>::Num: Unpin,
    'b: 'a, 

impl<'a, 'b, A, T> !UnwindSafe for MultiRectMut<'a, 'b, A, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.