lazy_concat
Lazy concatenation to String
or Vec
, supporting iteration and slices.
Documentation
Automatic generated documentation can be found here.
Usage
[]
= "0.1.1"
extern crate lazy_concat;
use LazyConcat;
let mut lazy_string = new
// No allocations happen here
.and_concat
.and_concat
.and_concat;
// Iteration works without any new allocation
for byte in lazy_string.bytes
// This extra block scope is not required with #[feature(nll)] (non-linear lifetimes).
// Finally allocate and concatenate the remainder of the string
let string: String = lazy_string.done;
assert_eq!;