stringlet 0.10.0

A fast, cheap, compile-time constructible, Copy-able, kinda primitive inline string type with 4 variants.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use core::str::Utf8Error;

#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum Error {
    /// The stringlet is too long to fit in the given size.
    TooLong,
    /// The stringlet is too short to be valid.
    TooShort,
    Utf8Error(Utf8Error),
}

impl From<Utf8Error> for Error {
    fn from(e: Utf8Error) -> Self {
        Self::Utf8Error(e)
    }
}