yoke

Module cartable_ptr

Source
Expand description

Types for optional pointers with niche optimization.

The main type is CartableOptionPointer, which is like Option<Rc> but with a niche so that the resulting Yoke has a niche. The following four types can be stored in the CartableOptionPointer:

  1. &T
  2. Box<T>
  3. Rc<T>
  4. Arc<T>

These four types implement the sealed unsafe trait CartablePointerLike. In addition, all except Box<T> impl CloneableCartablePointerLike, which allows CartableOptionPointer to implement Clone.

Structs§

Traits§