Trait borrow_bag::Lookup[][src]

pub trait Lookup<T, N> { }

Allows borrowing a value of type T from the implementing type. This can be used to constrain a Handle argument to ensure it can be used with the corresponding BorrowBag.

Examples

fn borrow_from<V, T, N>(bag: &BorrowBag<V>, handle: Handle<T, N>) -> &T
    where V: Lookup<T, N>
{
    bag.borrow(handle)
}

Implementors

Loading content...