Crate fixstr

Source
Expand description

A small string type with fixed capacity stored on the stack

§Examples

use fixstr::FixStr;

// Create a FixStr with capacity of 16 octets
let tiny: FixStr<16> = FixStr::new("Hello").unwrap();
assert_eq!(tiny.as_str(), "Hello");
assert_eq!(tiny.capacity(), 16);

// FixStr implements common traits
let tiny2: FixStr<16> = "World".try_into().unwrap();
let message: String = tiny2.into();

Structs§

FixStr