Trait kernel::linked_list::Wrapper[][src]

pub trait Wrapper<T: ?Sized> {
    fn into_pointer(self) -> NonNull<T>;
unsafe fn from_pointer(ptr: NonNull<T>) -> Self;
fn as_ref(&self) -> &T; }
Expand description

Wraps an object to be inserted in a linked list.

Required methods

Converts the wrapped object into a pointer that represents it.

Converts the object back from the pointer representation.

Safety

The passed pointer must come from a previous call to Wrapper::into_pointer().

Returns a reference to the wrapped object.

Implementors