Struct containerof::BorrowBoxMut [] [src]

pub struct BorrowBoxMut<'a, T: 'a> where T: Intrusive {
    // some fields omitted
}

A mutable borrow-pointer that does not require explicit ownership of the value being borrowed. Used to allow construction of the Intrusive structure translation type from a mutable borrow pointer.

Methods

impl<'a, T> BorrowBoxMut<'a, T> where T: Intrusive

fn new(source: &'a mut T) -> BorrowBoxMut<'a, T>

Build a BorrowBoxMut from a borrow pointer.

unsafe fn new_from<U>(pointer: IntrusiveAlias, _lifetime: &'a mut U) -> BorrowBoxMut<'a, T>

Build a BorrowBoxMut from a raw pointer and a lifetime. Unsafe, because this API cannot guarantee that the pointer value is of the same type as the destination borrow box.

Trait Implementations

impl<'a, T> Deref for BorrowBoxMut<'a, T> where T: Intrusive

type Target = T

fn deref<'b>(&'b self) -> &'b T

impl<'a, T> DerefMut for BorrowBoxMut<'a, T> where T: Intrusive

fn deref_mut<'b>(&'b mut self) -> &'b mut T

Derived Implementations

impl<'a, T: Debug + 'a> Debug for BorrowBoxMut<'a, T> where T: Intrusive, T: Debug

fn fmt(&self, __arg_0: &mut Formatter) -> Result