pub struct VarPtr<'a> { /* private fields */ }
Expand description
Represents an AnyVar
pointer that can be used for comparison.
If two of these values are equal, both variables point to the same arc or context at the moment of comparison.
Implementations§
source§impl<'a> VarPtr<'a>
impl<'a> VarPtr<'a>
sourcepub fn raw_pointer(&self) -> *const ()
pub fn raw_pointer(&self) -> *const ()
Gets the pointer.
§Safety
Trying to read or write values using this pointer is never safe.
Trying to identify a variable using the raw pointer is only valid if you know the variable is still alive. The variable could be dropped and new one allocated at the same address.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for VarPtr<'a>
impl<'a> RefUnwindSafe for VarPtr<'a>
impl<'a> !Send for VarPtr<'a>
impl<'a> !Sync for VarPtr<'a>
impl<'a> Unpin for VarPtr<'a>
impl<'a> UnwindSafe for VarPtr<'a>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more