[][src]Crate smart_pointer

Traits for smart pointer functionality.

The basic traits are SmartPointer and SmartPointerMut for basic creation, obtaining ownership, borrowing and dereferencing. Further subtraits expose more specialized functionality which is nonetheless applicable to any sort of smart pointer.

These additional, specialized traits are being added to this crate as consumers need them. If you would like to see traits for additional features, e.g. conversion with raw pointers, efficient borrows, pointers directly to the data or thin DST pointers, open an issue.

Traits

IntoMut

A SmartPointer which might grant mutable access, depending on run-time checks.

SmartPointer

The minimum amount of functionality common to all smart pointer types pointing to a value of type T. This trait only grants immutable access to the stored value, see SmartPointerMut for mutable access and TryIntoMut for fallible conversion into a mutable variant.

SmartPointerMut

A SmartPointer which beyond immutable access to the wrapped value also provides mutable access via the AsMut, BorrowMut and DerefMut traits.