Enum smallbox::SmallBox
[−]
[src]
pub enum SmallBox<T: ?Sized> { Stack(StackBox<T>), Box(Box<T>), }
Stack allocation with heap fallback
Examples
use smallbox::SmallBox; let val: SmallBox<PartialEq<usize>> = SmallBox::new(5usize); assert!(*val == 5)
Variants
Stack(StackBox<T>)
Box(Box<T>)
Methods
impl<T: ?Sized> SmallBox<T>
[src]
Trait Implementations
impl<T: ?Sized> Deref for SmallBox<T>
[src]
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<T: ?Sized> DerefMut for SmallBox<T>
[src]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value