crossbeam::epoch

Trait Pointer

Source
pub trait Pointer<T>
where T: Pointable + ?Sized,
{ // Required methods fn into_usize(self) -> usize; unsafe fn from_usize(data: usize) -> Self; }
Expand description

A trait for either Owned or Shared pointers.

Required Methods§

Source

fn into_usize(self) -> usize

Returns the machine representation of the pointer.

Source

unsafe fn from_usize(data: usize) -> Self

Returns a new pointer pointing to the tagged pointer data.

§Safety

The given data should have been created by Pointer::into_usize(), and one data should not be converted back by Pointer::from_usize() multiple times.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> Pointer<T> for Owned<T>
where T: Pointable + ?Sized,

Source§

impl<T> Pointer<T> for Shared<'_, T>
where T: Pointable + ?Sized,