Crate borrow_bag [] [src]

A type-safe, heterogeneous collection with zero-cost add and borrow.

BorrowBag allows the storage of any value, and returns a Handle which can be used to borrow the value back later. As the BorrowBag is add-only, Handle values remain valid for the lifetime of the BorrowBag.

Structs

BorrowBag

BorrowBag allows the storage of any value using add(T), and returns a Handle which can be used to borrow the value back later. As the BorrowBag is add-only, Handle values remain valid for the lifetime of the BorrowBag.

Functions

new_borrow_bag

Creates a new, empty BorrowBag.