Trait supercow::ext::PointerFirstRef
[−]
[src]
pub unsafe trait PointerFirstRef: Copy { }
Marker trait identifying a pointer type which begins with an absolute address and contains no other address-dependent information.
Supercow
expects to be able to read the first machine-pointer-sized value
of such a pointer and perform address arithmetic upon it.
There is no utility of applying this trait to anything other than a const pointer.
Unsafety
Behaviour is undefined if a marked type does not begin with a real pointer to a value (with the usual exception of ZSTs, where the pointer does not need to point to anything in particular) or if other parts of the type contain address-dependent information.
Behaviour is undefined if the pointer has any Drop
implementation,
should a future Rust version make such things possible.