pub struct GlobalPtr<T> { /* private fields */ }
Expand description
A global pointer, containing a fully qualified object ID and offset.
Implementations§
Source§impl<T> GlobalPtr<T>
impl<T> GlobalPtr<T>
Sourcepub fn is_local(&self, place: impl AsRef<ObjectHandle>) -> bool
pub fn is_local(&self, place: impl AsRef<ObjectHandle>) -> bool
Checks if the global pointer is local from the perspective of a given object.
Sourcepub unsafe fn resolve_stable(&self) -> Ref<'_, T>
pub unsafe fn resolve_stable(&self) -> Ref<'_, T>
Resolve a global pointer into a reference.
§Safety
The underlying object must not mutate while the reference exists, unless the underlying type is Sync + Send. The memory referenced by the pointer must have an valid representation of the type.
Sourcepub unsafe fn resolve(&self) -> Ref<'_, T>
pub unsafe fn resolve(&self) -> Ref<'_, T>
Resolve a global pointer into a reference.
§Safety
The underlying object must not mutate while the reference exists, unless the underlying type is Sync + Send. The memory referenced by the pointer must have an valid representation of the type.
Sourcepub unsafe fn resolve_mut(&self) -> RefMut<'_, T>
pub unsafe fn resolve_mut(&self) -> RefMut<'_, T>
Resolve a global pointer into a reference.
§Safety
The underlying object must not mutate while the reference exists, unless the underlying type is Sync + Send. The memory referenced by the pointer must have an valid representation of the type. No other references may be alive referring to the underlying data.
Trait Implementations§
Source§impl<'a, T> From<RefSliceMut<'a, T>> for GlobalPtr<T>
impl<'a, T> From<RefSliceMut<'a, T>> for GlobalPtr<T>
Source§fn from(value: RefSliceMut<'a, T>) -> Self
fn from(value: RefSliceMut<'a, T>) -> Self
Source§impl<T> From<TxRefSlice<T>> for GlobalPtr<T>
impl<T> From<TxRefSlice<T>> for GlobalPtr<T>
Source§fn from(value: TxRefSlice<T>) -> Self
fn from(value: TxRefSlice<T>) -> Self
Source§impl<T: Ord> Ord for GlobalPtr<T>
impl<T: Ord> Ord for GlobalPtr<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<T: PartialOrd> PartialOrd for GlobalPtr<T>
impl<T: PartialOrd> PartialOrd for GlobalPtr<T>
impl<T> Copy for GlobalPtr<T>
impl<T: Eq> Eq for GlobalPtr<T>
impl<T: Invariant> Invariant for GlobalPtr<T>
impl<T> StructuralPartialEq for GlobalPtr<T>
Auto Trait Implementations§
impl<T> Freeze for GlobalPtr<T>
impl<T> !ObjSafe for GlobalPtr<T>
impl<T> RefUnwindSafe for GlobalPtr<T>where
T: RefUnwindSafe,
impl<T> !Send for GlobalPtr<T>
impl<T> StoreCopy for GlobalPtr<T>where
T: StoreCopy,
impl<T> !Sync for GlobalPtr<T>
impl<T> Unpin for GlobalPtr<T>
impl<T> UnwindSafe for GlobalPtr<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.