pub struct Protect<T> { /* private fields */ }Implementations§
Source§impl<T> Protect<T>
impl<T> Protect<T>
pub unsafe fn new_unchecked(value: T) -> Protect<T>
pub unsafe fn get_unchecked(&self) -> &T
pub unsafe fn get_unchecked_mut(&mut self) -> &mut T
pub unsafe fn into_inner_unchecked(self) -> T
Trait Implementations§
Source§impl<T: Ord> Ord for Protect<T>
impl<T: Ord> Ord for Protect<T>
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> PartialOrd for Protect<T>
impl<T: PartialOrd> PartialOrd for Protect<T>
impl<T: Copy> Copy for Protect<T>
impl<T: Eq> Eq for Protect<T>
impl<T> StructuralPartialEq for Protect<T>
Auto Trait Implementations§
impl<T> Freeze for Protect<T>where
T: Freeze,
impl<T> RefUnwindSafe for Protect<T>where
T: RefUnwindSafe,
impl<T> Send for Protect<T>where
T: Send,
impl<T> Sync for Protect<T>where
T: Sync,
impl<T> Unpin for Protect<T>where
T: Unpin,
impl<T> UnwindSafe for Protect<T>where
T: UnwindSafe,
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