#check #dropping #loaned

no-std loaned

Safely move values with live inner borrows

3 releases

0.1.2 Jun 3, 2024
0.1.1 Apr 24, 2024
0.1.0 Apr 19, 2024

#977 in Data structures

Download history 51/week @ 2024-12-15 90/week @ 2024-12-22 186/week @ 2024-12-29 83/week @ 2025-01-05 68/week @ 2025-01-12 44/week @ 2025-01-19 45/week @ 2025-01-26 120/week @ 2025-02-02 152/week @ 2025-02-09 97/week @ 2025-02-16 126/week @ 2025-02-23 110/week @ 2025-03-02 70/week @ 2025-03-09 144/week @ 2025-03-16 91/week @ 2025-03-23 49/week @ 2025-03-30

365 downloads per month
Used in 3 crates (via bend-lang)

MIT/Apache

26KB
547 lines

loaned

loaned provides Loaned<'t, T> and LoanedMut<'t, T> types which allow owning values that have live immutable/mutable borrows, allowing a limited (but very expressive) subset of self-referential structures to be expressed.

Examples

See examples/.

Safety

loaned uses unsafe code, the soundness of which has not been rigorously proven, although basic tests have been run successfully through Miri.

No runtime deps

Features