Type Definition rental::RentVec
[−]
[src]
type RentVec<'rental, T: 'rental, B: 'rental> = RentRef<'rental, Vec<T>, B>;
A predefined type that rents values from a Vec<T>
.
Examples
let v = vec![1, 2, 3]; let rent = rental::RentVec::new(v, |v| &v[0..2]); assert_eq!(rent.len(), 2);