Struct alloc::boxed::PinBox
[−]
[src]
A pinned, heap allocated reference.
Methods
impl<T> PinBox<T>
[src]
[−]
impl<T> PinBox<T>
pub fn new(data: T) -> PinBox<T>
[src]
[−]
pub fn new(data: T) -> PinBox<T>
Allocate memory on the heap, move the data into it and pin it.
impl<T: ?Sized> PinBox<T>
[src]
[−]
impl<T: ?Sized> PinBox<T>
pub fn as_pin<'a>(&'a mut self) -> Pin<'a, T>
[src]
[−]
pub fn as_pin<'a>(&'a mut self) -> Pin<'a, T>
Get a pinned reference to the data in this PinBox.
pub unsafe fn get_mut<'a>(this: &'a mut PinBox<T>) -> &'a mut T
[src]
[−]
pub unsafe fn get_mut<'a>(this: &'a mut PinBox<T>) -> &'a mut T
Get a mutable reference to the data inside this PinBox.
This function is unsafe. Users must guarantee that the data is never moved out of this reference.
ⓘImportant traits for Box<I>pub unsafe fn unpin(this: PinBox<T>) -> Box<T>
[src]
[−]
ⓘImportant traits for Box<I>
pub unsafe fn unpin(this: PinBox<T>) -> Box<T>
Convert this PinBox into an unpinned Box.
This function is unsafe. Users must guarantee that the data is never moved out of the box.
Trait Implementations
impl<T: ?Sized> From<Box<T>> for PinBox<T>
[src]
[+]
impl<T: ?Sized> From<Box<T>> for PinBox<T>
impl<T: Unpin + ?Sized> From<PinBox<T>> for Box<T>
[src]
[+]
impl<T: Unpin + ?Sized> From<PinBox<T>> for Box<T>
impl<T: ?Sized> Deref for PinBox<T>
[src]
[+]
impl<T: ?Sized> Deref for PinBox<T>
impl<T: Unpin + ?Sized> DerefMut for PinBox<T>
[src]
[+]
impl<T: Unpin + ?Sized> DerefMut for PinBox<T>
impl<T: Display + ?Sized> Display for PinBox<T>
[src]
[+]
impl<T: Display + ?Sized> Display for PinBox<T>
impl<T: Debug + ?Sized> Debug for PinBox<T>
[src]
[+]
impl<T: Debug + ?Sized> Debug for PinBox<T>
impl<T: ?Sized> Pointer for PinBox<T>
[src]
[+]
impl<T: ?Sized> Pointer for PinBox<T>
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<PinBox<U>> for PinBox<T>
[src]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<PinBox<U>> for PinBox<T>