Trait intrusive_collections::PointerOps
source · pub unsafe trait PointerOps {
type Value: ?Sized;
type Pointer;
// Required methods
unsafe fn from_raw(&self, value: *const Self::Value) -> Self::Pointer;
fn into_raw(&self, ptr: Self::Pointer) -> *const Self::Value;
}
Expand description
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.