|
| auto | clone () -> Self |
| | Creates a new Box by cloning the contained value.
|
| |
| void | clone_from (Self &source) |
| | Replaces the contents of this Box with a clone of the source.
|
| |
| constexpr auto | into_raw () &&noexcept -> mut_ptr< T > |
| | Consumes the Box, returning the wrapped raw pointer without deallocating.
|
| |
| constexpr auto | get () noexcept -> mut_ptr< T >::value_type * |
| | Returns a raw pointer to the contained value.
|
| |
|
constexpr auto | operator-> () noexcept |
| | Dereferences the Box, providing mutable access to the inner value.
|
| |
|
constexpr auto | operator-> () const noexcept |
| | Dereferences the Box, providing const access to the inner value.
|
| |
|
constexpr | operator bool () const noexcept |
| | Returns true if this Box holds a valid (non-null) pointer.
|
| |
|
void | reset () noexcept |
| | Destroys the contained value and deallocates the memory.
|
| |
| constexpr auto | as_ref () const noexcept -> ref< T > |
| | Returns an immutable reference to the contained value.
|
| |
| constexpr auto | as_ptr () const noexcept -> ptr< T > |
| | Returns a const pointer to the contained value.
|
| |
| constexpr auto | as_mut_ptr () const noexcept -> mut_ptr< T > |
| | Returns a mutable pointer to the contained value.
|
| |
| auto | clone () -> Self |
| | Creates a new Box by cloning all elements of the contained array.
|
| |
|
template<typename... Args>
requires Impled<T, Sized> |
| static auto | make (Args &&... args) -> Box |
| | Allocates memory on the heap and constructs T in place with the given arguments.
|
| |
| template<typename U > |
| static auto | make (U &&in) -> Box requires(! Impled< T, Sized > &&mtp::dyn_traits< T >::template Impled< U >) |
| | Allocates memory on the heap for a dynamically-sized trait object.
|
| |
| static auto | pin (T &&in) -> Pin< Box > |
| | Constructs a new Pin<Box<T>> by moving the value onto the heap.
|
| |
| static constexpr Box | from_raw (mut_ptr< T > raw) noexcept |
| | Constructs a Box from a raw mutable pointer.
|
| |
template<typename T>
class alloc::boxed::Box< T >
A pointer type that uniquely owns a heap allocation of type T.
- Template Parameters
-
| T | The type of the value stored on the heap. |