#self-referential #borrow #live #move #values #structures #safely

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

#724 in Data structures

Download history 83/week @ 2024-10-01 89/week @ 2024-10-08 95/week @ 2024-10-15 69/week @ 2024-10-22 65/week @ 2024-10-29 89/week @ 2024-11-05 94/week @ 2024-11-12 65/week @ 2024-11-19 77/week @ 2024-11-26 73/week @ 2024-12-03 104/week @ 2024-12-10 53/week @ 2024-12-17 83/week @ 2024-12-24 213/week @ 2024-12-31 66/week @ 2025-01-07 41/week @ 2025-01-14

422 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