Expand description

Wrappers around references, boxes or Arcs.

Features:

  • ARef: OwningRef with even further erasure of the owner.

  • rc::Strong/Weak/Ref/RefMut: An Rc<RefCell<T>> in just a few bytes of storage, and poisoning support.

  • arc::Strong/Weak/Ref/RefMut: An Arc<Spinlock<T>>- the thread-safe version of the above.

  • RMBA: Wrap a &T, &mut T, Box<T> or Arc<T> within the size of a single pointer.

  • Bx and Bxm: Boxes without DerefMove.

Re-exports

pub use crate::aref::ARef;
pub use crate::aref::ARefs;
pub use crate::aref::ARefss;
pub use crate::rmba::RMBA;

Modules

This is somewhat like an Arc<RwLock<T>>, but with only one usize of overhead, and the lock is a spinlock (there is no wait-and-sleep functionality).

Type aliases for arc.

An alternative to Rc<RefCell<T>>, with less memory overhead and poisoning support.

Type aliases for an rc with 1 byte of overhead.

Type aliases for an rc with 2 bytes of overhead.

Type aliases for an rc with 4 bytes of overhead.

Typedefs for an rc with 8 bytes of overhead.

Typedefs for an rc with 16 bytes of overhead.

Macros

If you need your own rc with custom overhead, you can invoke this macro for your own type (which is normally a newtype around an integer).

Structs

A simple wrapper around Box to avoid DerefMove.

A simple wrapper around Box to avoid DerefMove. Like Bx, but also allows mutable access to the interior of the box.