pub struct UntypedPointer(/* private fields */);Expand description
Similar to Pointer<T> but provides no guarantees other than that it points
to some allocation inside the GC heap, and has the minimal GC-required
alignment.
§Safety
See Pointer<T>.
Implementations§
Source§impl UntypedPointer
impl UntypedPointer
Sourcepub unsafe fn as_typed_ptr<T>(&self) -> Pointer<T>
pub unsafe fn as_typed_ptr<T>(&self) -> Pointer<T>
Convert this UntypedPointer into a Pointer<T>.
§Safety
You had better be damn sure that this pointer points at a T
instance. See also the Pointer<T> safety rules and its new method’s
safety rules.
Trait Implementations§
Source§impl Clone for UntypedPointer
impl Clone for UntypedPointer
Source§fn clone(&self) -> UntypedPointer
fn clone(&self) -> UntypedPointer
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 Debug for UntypedPointer
impl Debug for UntypedPointer
Source§impl<T> From<Pointer<T>> for UntypedPointer
impl<T> From<Pointer<T>> for UntypedPointer
Source§fn from(p: Pointer<T>) -> UntypedPointer
fn from(p: Pointer<T>) -> UntypedPointer
Converts to this type from the input type.
Source§impl Hash for UntypedPointer
impl Hash for UntypedPointer
Source§impl Ord for UntypedPointer
impl Ord for UntypedPointer
Source§fn cmp(&self, other: &UntypedPointer) -> Ordering
fn cmp(&self, other: &UntypedPointer) -> 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 PartialEq for UntypedPointer
impl PartialEq for UntypedPointer
Source§impl PartialOrd for UntypedPointer
impl PartialOrd for UntypedPointer
impl Copy for UntypedPointer
impl Eq for UntypedPointer
impl StructuralPartialEq for UntypedPointer
Auto Trait Implementations§
impl Freeze for UntypedPointer
impl RefUnwindSafe for UntypedPointer
impl !Send for UntypedPointer
impl !Sync for UntypedPointer
impl Unpin for UntypedPointer
impl UnwindSafe for UntypedPointer
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