Struct alloc::boxed::BoxStable [-]  [+] [src]

pub struct Box<T>(_);

A type that represents a uniquely-owned value.

Methods

impl<T> Box<T>

fn new(x: T) -> Box<T>

Moves x into a freshly allocated box on the global exchange heap.

Trait Implementations

impl<T: Default> Default for Box<T>

fn default() -> Box<T>

impl<T> Default for Box<[T]>

fn default() -> Box<[T]>

impl<T: Clone> Clone for Box<T>

fn clone(&self) -> Box<T>

Returns a copy of the owned box.

fn clone_from(&mut self, source: &Box<T>)

Performs copy-assignment from source by reusing the existing allocation.

impl<T: ?Sized + PartialEq> PartialEq for Box<T>

fn eq(&self, other: &Box<T>) -> bool

fn ne(&self, other: &Box<T>) -> bool

impl<T: ?Sized + PartialOrd> PartialOrd for Box<T>

fn partial_cmp(&self, other: &Box<T>) -> Option<Ordering>

fn lt(&self, other: &Box<T>) -> bool

fn le(&self, other: &Box<T>) -> bool

fn ge(&self, other: &Box<T>) -> bool

fn gt(&self, other: &Box<T>) -> bool

impl<T: ?Sized + Ord> Ord for Box<T>

fn cmp(&self, other: &Box<T>) -> Ordering

impl<T: ?Sized + Eq> Eq for Box<T>

fn assert_receiver_is_total_eq(&self)

impl<S: Hasher, T: ?Sized + Hash<S>> Hash<S> for Box<T>

fn hash(&self, state: &mut S)

impl BoxAny for Box<Any>

fn downcast<T: 'static>(self) -> Result<Box<T>, Box<Any>>

impl<T: ?Sized + Show> Show for Box<T>

fn fmt(&self, f: &mut Formatter) -> Result

impl<T: ?Sized + String> String for Box<T>

fn fmt(&self, f: &mut Formatter) -> Result

impl Show for Box<Any>

fn fmt(&self, f: &mut Formatter) -> Result

impl<T: ?Sized> Deref for Box<T>

type Target = T

fn deref(&self) -> &T

impl<T: ?Sized> DerefMut for Box<T>

fn deref_mut(&mut self) -> &mut T