Trait Well
Source pub unsafe trait Well {
type Target;
// Required methods
unsafe fn insert(ptr: NonNull<Self::Target>) -> Self;
fn remove(self) -> NonNull<Self::Target>;
}
Expand description
Place that can store a smart pointer.
§Safety
Types that implement this trait assert that the insert and remove methods are true
inverses of each other with no side effects.
Data stored in the pointer.
Put the data back into the well.
§Safety
The pointer passed to insert must previously have been received from remove.
Take the data out of the well.
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Source§Available on crate features alloc only.
Source§Available on crate feature alloc only.
Source§Available on crate feature alloc only.
Source§Available on crate feature alloc only.
Source§Available on crate feature alloc only.