[−][src]Struct dinotree_alg::query::MultiRectMut
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]
&mut self,
rect: Rect<T::Num>,
func: impl FnMut(PMut<'a, T>)
) -> Result<(), RectIntersectErr>
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,
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,
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,
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,
<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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,