[−][src]Trait intrusive_collections::PointerOps
Trait for pointer conversion operations.
Value
is the actual object type managed by the collection. This type will
typically have a link as a struct field.
Pointer
is a pointer type which "owns" an object of type Value
.
Operations which insert an element into an intrusive collection will accept
such a pointer and operations which remove an element will return this type.
Associated Types
type Value: ?Sized
Object type which is inserted into an intrusive collection.
type Pointer
Pointer type which owns an instance of a value.
Required methods
unsafe fn from_raw(&self, value: *const Self::Value) -> Self::Pointer
Constructs an owned pointer from a raw pointer.
Safety
The raw pointer must have been previously returned by into_raw
.
An implementation of from_raw
must not panic.
fn into_raw(&self, ptr: Self::Pointer) -> *const Self::Value
Consumes the owned pointer and returns a raw pointer to the owned object.