pub struct Box<T, STATE = Init> { /* fields omitted */ }
Expand description
Initializes this memory block
Returns the mutable slice view of Self
The element type of the slice view
Returns the immutable slice view of Self
impl<T> Debug for Box<T> where
T: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more
The resulting type after dereferencing.
impl<T> DerefMut for Box<T>
Mutably dereferences the value.
impl<T> Display for Box<T> where
T: Display,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the value using the given formatter. Read more
impl<T> Hash for Box<T> where
T: Hash,
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
impl<T> Ord for Box<T> where
T: Ord,
fn cmp(&self, rhs: &Box<T>) -> 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
impl<T> PartialEq<Box<T, Init>> for Box<T> where
T: PartialEq,
fn eq(&self, rhs: &Box<T>) -> 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 !=
.
impl<T> PartialOrd<Box<T, Init>> for Box<T> where
T: PartialOrd,
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<T> Eq for Box<T> where
T: Eq,
impl<T, S> Send for Box<T, S> where
T: Send,
impl<T, S> Sync for Box<T, S> where
T: Sync,
impl<T, STATE> Unpin for Box<T, STATE> where
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>