Macro take
Source macro_rules! take {
($loaned:expr) => { ... };
}
Expand description
Takes the value from a Loaned or LoanedMut, statically ensuring that
't is expired.
ยงExample
use loaned::{take, LoanedMut};
let (borrow, loaned) = LoanedMut::loan(Box::new(123));
*borrow = 456;
assert_eq!(take!(loaned), Box::new(456));