fst_incremental 1.0.0

A thread-safe, updatable finite state set: dynamic insertions, deletions and queries over an immutable fst::Set fronted by a compact mutation buffer with amortized rebuilds.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use fst::Error as FstError;
use thiserror::Error;

/// Every fallible operation in this crate returns one of these.
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum IncrementalFstError {
  /// The underlying `fst` crate rejected a build or a read.
  #[error("FST operation failed: {0}")]
  Fst(#[from] FstError),
  /// A file could not be opened, mapped, or written during a rebuild.
  #[error("IO Error: {0}")]
  Io(#[from] std::io::Error),
}

/// Shorthand for a result carrying [`IncrementalFstError`].
pub type Result<T> = std::result::Result<T, IncrementalFstError>;