Trait PointerDeref

Source
pub unsafe trait PointerDeref: PointerLike + Deref<Target = Self::Pointee> { }
Expand description

Trait that allows to create immutable references to the pointed-at object.

§Safety

Implementer must guarantee safety of creating, using and keeping of immutable references from the raw pointer returned by PointerLike::into_ptr. It must also be allowed to operate on this raw pointer in the manner of an immutable reference.

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.

Implementations on Foreign Types§

Source§

impl<Ptr: PointerDeref> PointerDeref for Pin<Ptr>

Source§

impl<T> PointerDeref for &T

Source§

impl<T> PointerDeref for &mut T

Source§

impl<T> PointerDeref for Box<T>

Source§

impl<T> PointerDeref for Rc<T>

Source§

impl<T> PointerDeref for Arc<T>

Implementors§

Source§

impl<T> PointerDeref for RefOnce<'_, T>