pub struct ObjPtr<T>(/* private fields */);Expand description
裸指针,基于unsafe实现
Implementations§
Trait Implementations§
Source§impl<T> Ord for ObjPtr<T>where
T: Ord,
impl<T> Ord for ObjPtr<T>where
T: Ord,
Source§impl<T> PartialOrd for ObjPtr<T>where
T: PartialOrd,
Deterministic ordering for ObjPtr.
Comparing by pointer address is non-deterministic, so we compare by the object itself.
impl<T> PartialOrd for ObjPtr<T>where
T: PartialOrd,
Deterministic ordering for ObjPtr. Comparing by pointer address is non-deterministic, so we compare by the object itself.
impl<T> Copy for ObjPtr<T>
impl<T> Eq for ObjPtr<T>
Auto Trait Implementations§
impl<T> Freeze for ObjPtr<T>
impl<T> RefUnwindSafe for ObjPtr<T>where
T: RefUnwindSafe,
impl<T> !Send for ObjPtr<T>
impl<T> !Sync for ObjPtr<T>
impl<T> Unpin for ObjPtr<T>
impl<T> UnwindSafe for ObjPtr<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