Module pointer_trait

Source
Expand description

Traits for pointers.

Modules§

immutable_ref
const equivalents of ImmutableRef methods.

Structs§

PK_MutReference
The type-level equivalent of PointerKind::MutReference.
PK_Reference
The type-level equivalent of PointerKind::Reference.
PK_SmartPointer
The type-level equivalent of PointerKind::SmartPointer.

Enums§

CallReferentDrop
Determines whether the referent of a pointer is dropped when the pointer deallocates the memory.
Deallocate
Determines whether the pointer is deallocated.
PointerKind
Describes the kind of a pointer.

Traits§

AsMutPtr
For getting a mutable raw pointer to the value that this points to.
AsPtr
For getting a const raw pointer to the value that this points to.
CanTransmuteElement
Whether the pointer can be transmuted to an equivalent pointer with T as the referent type.
GetPointerKind
What kind of pointer this is.
ImmutableRef
Trait for non-owning pointers that are shared-reference-like.
OwnedPointer
For owned pointers, allows extracting their contents separate from deallocating them.
PointerKindVariant
For restricting types to the type-level equivalents of PointerKind variants.
TransmuteElement
Allows transmuting pointers to point to a different type.