Trait yoke::cartable_ptr::CartablePointerLike

source ·
pub unsafe trait CartablePointerLike: StableDeref + Sealed { }
Expand description

An object fully representable by a non-null pointer.

§Safety

Implementer safety:

  1. into_raw transfers ownership of the values referenced by StableDeref to the caller, if there is ownership to transfer
  2. drop_raw returns ownership back to the impl, if there is ownership to transfer

Note: if into_raw returns the sentinel pointer, memory leaks may occur, but this will not lead to undefined behaviour.

Note: the pointer NonNull<Self::Raw> may or may not be aligned and it should never be dereferenced. Rust allows unaligned pointers; see std::ptr::read_unaligned.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, T> CartablePointerLike for &'a T

source§

impl<T> CartablePointerLike for Box<T>

source§

impl<T> CartablePointerLike for Rc<T>

source§

impl<T> CartablePointerLike for Arc<T>

Implementors§