Struct containerof::BorrowBox
[−]
[src]
pub struct BorrowBox<'a, T: 'a> { /* fields omitted */ }
A 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 borrow pointer.
Methods
impl<'a, T> BorrowBox<'a, T> where
T: Intrusive,
[src]
T: Intrusive,
fn new(source: &'a T) -> BorrowBox<'a, T>
Build a BorrowBox from a borrow pointer.
unsafe fn new_from<U>(
pointer: IntrusiveAlias,
_lifetime: &'a U
) -> BorrowBox<'a, T>
pointer: IntrusiveAlias,
_lifetime: &'a U
) -> BorrowBox<'a, T>
Build a BorrowBox 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: Debug + 'a> Debug for BorrowBox<'a, T>
[src]
impl<'a, T> Deref for BorrowBox<'a, T> where
T: Intrusive,
[src]
T: Intrusive,