compact_strings 4.1.2

A more compact but limited representation of a list of strings or bytestrings.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pub(crate) struct Metadata {
    pub(crate) start: usize,
    pub(crate) len: usize,
}

impl Metadata {
    #[inline]
    pub(crate) const fn new(start: usize, len: usize) -> Self {
        Self { start, len }
    }

    #[inline]
    pub(crate) const fn as_tuple(&self) -> (usize, usize) {
        (self.start, self.len)
    }
}