Crate genref

Source
Expand description

§Generational counting

This crate implements Vale’s generational reference counting memory management. Intended as an alternative to Rc with slightly different semantics.

Advantages over Rc:

  • Sharing references are Copy and therefore extremely cheap
  • RAII semantics

Disadvantages:

  • Only one owned reference, requiring management
  • Dereferencing returns Option
  • Not Deref

The locking system is non-granular for ease of implementation (and possibly speed.)

Structs§

Reading
Non-exclusive lock (ZST)
Strong
Strong reference
Weak
Weak reference
Writing
Exclusive lock (ZST)

Enums§

Ref

Functions§

reading
writing