Expand description
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. - Smart
Pointer - 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, seeSmartPointerMut
for mutable access andTryIntoMut
for fallible conversion into a mutable variant. - Smart
Pointer Mut - A
SmartPointer
which beyond immutable access to the wrapped value also provides mutable access via theAsMut
,BorrowMut
andDerefMut
traits.