Trait containerof::IntrusiveBase [] [src]

pub trait IntrusiveBase: Sized {
    type Container;
    type Field;
    fn offset() -> usize;
    unsafe fn new(_: IntrusiveAlias) -> Self;
    unsafe fn as_alias<'a>(&'a self) -> &'a IntrusiveAlias;
}

Minimal trait that, when implemented for a type, allows for the blanket implementation of the Intrusive trait for that type. This is the trait implemented by the containerof_intrusive! macro, and the only implementors of this trait should be the translation-types defined by the containerof_intrusive! macro.

Associated Types

Type of containing structure.

Type of intrusive field within containing structure.

Required Methods

Returns offset of intrusive field within containing structure.

Ownership-moving translation from generic intrusive pointer alias to type-safe intrusive pointer.

Allow using type-safe intrusive pointer as generic intrusive pointer.

Implementors