abin 0.1.6

A library for working with binaries and strings. The library tries to avoid heap-allocations / memory-copy whenever possible by automatically choosing a reasonable strategy: stack for small binaries; static-lifetime-binary or reference-counting.
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::{AnyStr, Bin};

/// A string backed by `Bin` (not `Sync + Send`), see `SStr` if you need `Sync + Send`.
///
/// ```rust
/// use abin::{Str, NewStr, StrFactory};
/// let str : Str = NewStr::from_static("Hello");
/// assert_eq!("Hello", str.as_str());
/// ```
pub type Str = AnyStr<Bin>;