pub struct Box<POOL, STATE = Init> where
POOL: Pool,
STATE: 'static, { /* fields omitted */ }
Expand description
A memory block that belongs to the global memory pool, POOL
Initializes this memory block
Forgets the contents of this memory block without running its destructor.
Note that this this does not return the memory block to the pool. The
block can be reused, or returned to the pool by dropping it.
Returns the mutable slice view of Self
The element type of the slice view
Returns the immutable slice view of Self
impl<P> Debug for Box<P> where
P: Pool,
P::Data: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more
impl<P> Deref for Box<P> where
P: Pool,
The resulting type after dereferencing.
impl<P> DerefMut for Box<P> where
P: Pool,
Mutably dereferences the value.
impl<P> Display for Box<P> where
P: Pool,
P::Data: Display,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more
impl<P, S> Drop for Box<P, S> where
P: Pool,
S: 'static,
Executes the destructor for this type. Read more
fn hash<H>(&self, state: &mut H) where
H: Hasher,
Feeds this value into the given [Hasher
]. Read more
1.3.0
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
fn cmp(&self, rhs: &Box<P>) -> Ordering
This method returns an [Ordering
] between self
and other
. Read more
1.21.0
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0
fn clamp(self, min: Self, max: Self) -> Self
Restrict a value to a certain interval. Read more
fn eq(&self, rhs: &Box<P>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
1.0.0
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
1.0.0
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
1.0.0
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<P, S> Send for Box<P, S> where
P: Pool,
P::Data: Send,
impl<P, S> Sync for Box<P, S> where
P: Pool,
P::Data: Sync,
impl<POOL, STATE> Unpin for Box<POOL, STATE> where
POOL: Unpin,
STATE: Unpin,
impl<T> Any for T where
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
Immutably borrows from an owned value. Read more
impl<T> BorrowMut<T> for T where
T: ?Sized,
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>