izihawa_fst/lib.rs
1// Copyright 2015 2016 2017 2018 Andrew Gallant
2// Copyright 2019 Paul Masurel
3//
4//! This is a fork over Andrew Gallant `fst` crate.
5//! Parts of this crate were retrofitted from a PR by Clément Renault
6//! https://github.com/BurntSushi/fst/pull/61
7#![warn(missing_docs)]
8#![allow(clippy::new_without_default)]
9#![allow(clippy::should_implement_trait)]
10
11pub use crate::automaton::Automaton;
12pub use crate::error::{Error, Result};
13pub use crate::map::{Chain, Map, MapBuilder};
14pub use crate::stream::{IntoStreamer, Streamer};
15
16mod regex;
17
18pub use self::regex::Regex;
19
20mod error;
21#[path = "automaton/mod.rs"]
22mod inner_automaton;
23#[path = "map.rs"]
24mod inner_map;
25pub mod raw;
26mod stream;
27
28/// Automaton implementations for finite state transducers.
29///
30/// This module defines a trait, `Automaton`, with several implementations
31/// including, but not limited to, union, intersection and complement.
32pub mod automaton {
33 pub use crate::inner_automaton::*;
34}
35
36/// Map operations implemented by finite state transducers.
37///
38/// This API provided by this sub-module is close in spirit to the API
39/// provided by
40/// [`std::collections::BTreeMap`](http://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html).
41///
42/// # Overview of types
43///
44/// `Map` is a read only interface to pre-constructed sets. `MapBuilder` is
45/// used to create new sets. (Once a set is created, it can never be modified.)
46/// `Stream`, `Keys` and `Values` are streams that originated from a map.
47/// `StreamBuilder` builds range queries. `OpBuilder` collects a set of streams
48/// and executes set operations like `union` or `intersection` on them with the
49/// option of specifying a merge strategy for a map's values. The rest of the
50/// types are streams for set operations.
51pub mod map {
52 pub use crate::inner_map::*;
53}