pub struct TinyBox<T>(/* private fields */);
Expand description
A tiny pointer to a heap allocated memory. As with all types of this crate, memory is
allocated on the heap. It is equivalent to std::boxed::Box
.
use tinypointers::TinyBox;
let x = TinyBox::new(42);
println!("{}", *x); // prints 42
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for TinyBox<T>
impl<T> RefUnwindSafe for TinyBox<T>where
T: RefUnwindSafe,
impl<T> !Send for TinyBox<T>
impl<T> !Sync for TinyBox<T>
impl<T> Unpin for TinyBox<T>
impl<T> UnwindSafe for TinyBox<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more