fm-index 0.3.1

FM index and its variant implementations for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// A unique id identifying a single piece (text fragment) in a text.
#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord, Hash)]
pub struct PieceId(usize);

impl From<usize> for PieceId {
    fn from(value: usize) -> Self {
        PieceId(value)
    }
}

impl From<PieceId> for usize {
    fn from(value: PieceId) -> usize {
        value.0
    }
}