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

#582 in HTTP server

Download history 673/week @ 2024-07-22 655/week @ 2024-07-29 679/week @ 2024-08-05 759/week @ 2024-08-12 558/week @ 2024-08-19 757/week @ 2024-08-26 795/week @ 2024-09-02 608/week @ 2024-09-09 603/week @ 2024-09-16 881/week @ 2024-09-23 1014/week @ 2024-09-30 547/week @ 2024-10-07 710/week @ 2024-10-14 885/week @ 2024-10-21 751/week @ 2024-10-28 588/week @ 2024-11-04

2,982 downloads per month
Used in 25 crates (via gotham)

MIT/Apache

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:

No runtime deps