9 releases (3 stable)
Uses old Rust 2015
1.1.1 | Sep 12, 2023 |
---|---|
1.1.0 | Mar 20, 2021 |
1.0.0 | Feb 28, 2018 |
0.4.0 | Nov 4, 2017 |
0.3.0 | May 17, 2017 |
2,973 downloads per month
Used in 25 crates
(via gotham)
11KB
118 lines
BorrowBag
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
.
For usage details, please see the documentation
Motivation
BorrowBag
solves the problem of assembling Gotham's Middleware
and Pipeline
structures,
storing concrete types without losing their type information, and with an ability to borrow them
back later after moving the collection.
The Gotham project extracted the implementation into this crate for use in other contexts and continues to maintain it.
License
Licensed under your option of:
Community
The following policies guide participation in our project and our community: