Function spare_capacity
fn spare_capacity<'a, T>(v: &'a mut Vec<T>) -> SpareCapacity<'a, T>
Construct an SpareCapacity, which implements Buffer.
This wraps a Vec and uses the spare capacity of the Vec as the buffer
to receive data in, automatically calling set_len on the Vec to set the
length to include the received elements.
This uses the existing capacity, and never allocates, so the Vec should
have some non-empty spare capacity!
Examples
#