Type Definition coca::AllocString

source · []
pub type AllocString<I = usize> = String<AllocStorage<ArrayLayout<u8>>, I>;
This is supported on crate feature alloc only.
Expand description

A string using a heap-allocated slice for storage.

Examples

let mut s = coca::AllocString::with_capacity(16usize);
s.push_str("Hello, ");
s.push_str("World!");
 
assert_eq!(s, "Hello, World!");