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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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