pub struct BBox<N, T> {
pub rect: Rect<N>,
pub inner: T,
}
Expand description
A bounding box container object that implements Aabb
and HasInner
.
Note that &mut BBox<N,T>
also implements Aabb
and HasInner
.
Using this one struct the user can construct the following types for bboxes to be inserted into the tree:
BBox<N,T>
(direct)&mut BBox<N,T>
(indirect)BBox<N,&mut T>
(rect direct, T indirect)
Fields
rect: Rect<N>
inner: T
Implementations
sourceimpl<N, T> BBox<N, T>
impl<N, T> BBox<N, T>
sourcepub fn new(rect: Rect<N>, inner: T) -> BBox<N, T>
pub fn new(rect: Rect<N>, inner: T) -> BBox<N, T>
Constructor. Also consider using crate::bbox()
pub fn many_swap(self) -> ManySwappable<Self>
Trait Implementations
impl<N: Copy, T: Copy> Copy for BBox<N, T>
impl<'a, N> ManySwap for BBox<N, ()>
impl<'a, N, T> ManySwap for BBox<N, &'a mut T>
Auto Trait Implementations
impl<N, T> RefUnwindSafe for BBox<N, T> where
N: RefUnwindSafe,
T: RefUnwindSafe,
impl<N, T> Send for BBox<N, T> where
N: Send,
T: Send,
impl<N, T> Sync for BBox<N, T> where
N: Sync,
T: Sync,
impl<N, T> Unpin for BBox<N, T> where
N: Unpin,
T: Unpin,
impl<N, T> UnwindSafe for BBox<N, T> where
N: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more