odict 3.3.0

A blazingly-fast dictionary file format for human languages
Documentation
pub struct SplitOptions {
    pub threshold: usize,
    pub follow: bool,
    pub insensitive: bool,
}

impl AsRef<SplitOptions> for SplitOptions {
    fn as_ref(&self) -> &Self {
        self
    }
}

impl Default for SplitOptions {
    fn default() -> Self {
        Self {
            threshold: 1,
            follow: false,
            insensitive: false,
        }
    }
}

impl SplitOptions {
    pub fn threshold(mut self, threshold: usize) -> Self {
        self.threshold = threshold;
        self
    }

    pub fn follow(mut self, follow: bool) -> Self {
        self.follow = follow;
        self
    }

    pub fn insensitive(mut self, insensitive: bool) -> Self {
        self.insensitive = insensitive;
        self
    }
}