[−][src]Struct broccoli::BBox
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
impl<N, T> BBox<N, T>
[src]
#[must_use]pub fn new(rect: Rect<N>, inner: T) -> BBox<N, T>
[src]
Constructor. Also consider using bbox()
impl<N: Copy, T> BBox<N, T>
[src]
#[must_use]pub fn into_semi_direct(&mut self) -> BBox<N, &mut T>
[src]
Creates a (Rect<N>,&mut T)
from a (Rect<N>,T)
#[must_use]pub fn into_indirect(&mut self) -> &mut BBox<N, T>
[src]
Simply returns a mutable reference
#[must_use]pub fn inner_as<B: 'static + Copy>(self) -> BBox<B, T> where
N: AsPrimitive<B>,
[src]
N: AsPrimitive<B>,
Change the number type of the Rect using promitive cast.
#[must_use]pub fn inner_into<A: From<N>>(self) -> BBox<A, T>
[src]
Change the number type using From
#[must_use]pub fn inner_try_into<A: TryFrom<N>>(self) -> Result<BBox<A, T>, A::Error>
[src]
Change the number type using TryFrom
Trait Implementations
impl<N: Num, T> Aabb for BBox<N, T>
[src]
impl<N: Num, T, '_> Aabb for &'_ mut BBox<N, T>
[src]
impl<N: Clone, T: Clone> Clone for BBox<N, T>
[src]
impl<N: Copy, T: Copy> Copy for BBox<N, T>
[src]
impl<N: Debug, T: Debug> Debug for BBox<N, T>
[src]
impl<N: Num, T> HasInner for BBox<N, T>
[src]
impl<N: Num, T, '_> HasInner for &'_ mut BBox<N, T>
[src]
Auto Trait Implementations
impl<N, T> RefUnwindSafe for BBox<N, T> where
N: RefUnwindSafe,
T: RefUnwindSafe,
[src]
N: RefUnwindSafe,
T: RefUnwindSafe,
impl<N, T> Send for BBox<N, T> where
N: Send,
T: Send,
[src]
N: Send,
T: Send,
impl<N, T> Sync for BBox<N, T> where
N: Sync,
T: Sync,
[src]
N: Sync,
T: Sync,
impl<N, T> Unpin for BBox<N, T> where
N: Unpin,
T: Unpin,
[src]
N: Unpin,
T: Unpin,
impl<N, T> UnwindSafe for BBox<N, T> where
N: UnwindSafe,
T: UnwindSafe,
[src]
N: UnwindSafe,
T: UnwindSafe,
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,
pub 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> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,