#borrow #live #values #inner #type #safely #move

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

#4 in #inner

Download history 105/week @ 2024-04-14 199/week @ 2024-04-21 51/week @ 2024-04-28 67/week @ 2024-05-05 1907/week @ 2024-05-12 2092/week @ 2024-05-19 842/week @ 2024-05-26 925/week @ 2024-06-02 489/week @ 2024-06-09 331/week @ 2024-06-16

2,739 downloads per month
Used in 2 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