#[repr(transparent)]pub struct ManuallyDrop<T: ?Sized> {
inner: ManuallyDrop<T>,
}Fields§
§inner: ManuallyDrop<T>Implementations§
Source§impl<T> ManuallyDrop<T>
impl<T> ManuallyDrop<T>
pub const fn new(value: T) -> Selfwhere
T: Forget,
pub const unsafe fn new_unchecked(value: T) -> Self
pub unsafe fn take(slot: &mut ManuallyDrop<T>) -> T
pub const fn into_inner(slot: ManuallyDrop<T>) -> T
Trait Implementations§
Source§impl<T: Clone + ?Sized> Clone for ManuallyDrop<T>
impl<T: Clone + ?Sized> Clone for ManuallyDrop<T>
Source§fn clone(&self) -> ManuallyDrop<T>
fn clone(&self) -> ManuallyDrop<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Default + ?Sized> Default for ManuallyDrop<T>
impl<T: Default + ?Sized> Default for ManuallyDrop<T>
Source§fn default() -> ManuallyDrop<T>
fn default() -> ManuallyDrop<T>
Returns the “default value” for a type. Read more
Source§impl<T: ?Sized> Deref for ManuallyDrop<T>
impl<T: ?Sized> Deref for ManuallyDrop<T>
Source§impl<T: ?Sized> DerefMut for ManuallyDrop<T>
impl<T: ?Sized> DerefMut for ManuallyDrop<T>
Source§impl<T: Ord + ?Sized> Ord for ManuallyDrop<T>
impl<T: Ord + ?Sized> Ord for ManuallyDrop<T>
Source§fn cmp(&self, other: &ManuallyDrop<T>) -> Ordering
fn cmp(&self, other: &ManuallyDrop<T>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd + ?Sized> PartialOrd for ManuallyDrop<T>
impl<T: PartialOrd + ?Sized> PartialOrd for ManuallyDrop<T>
impl<T: Copy + ?Sized> Copy for ManuallyDrop<T>
impl<T: Eq + ?Sized> Eq for ManuallyDrop<T>
impl<T: ?Sized> Forget for ManuallyDrop<T>
impl<T: ?Sized> StructuralPartialEq for ManuallyDrop<T>
Auto Trait Implementations§
impl<T> Freeze for ManuallyDrop<T>
impl<T> RefUnwindSafe for ManuallyDrop<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for ManuallyDrop<T>
impl<T> Sync for ManuallyDrop<T>
impl<T> Unpin for ManuallyDrop<T>
impl<T> UnsafeUnpin for ManuallyDrop<T>where
T: UnsafeUnpin + ?Sized,
impl<T> UnwindSafe for ManuallyDrop<T>where
T: UnwindSafe + ?Sized,
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