[][src]Struct spyglass::SuffixTrie

pub struct SuffixTrie { /* fields omitted */ }

Implementations

impl SuffixTrie[src]

pub fn new(string: &str) -> Self[src]

New suffix trie containing suffixes of a single string

pub fn empty() -> Self[src]

New empty suffix trie

pub fn from_file(path: &str) -> Result<SuffixTrie, Error>[src]

New suffix trie containing the suffixes of each sentence from the given file

pub fn add_file(&mut self, path: &str) -> Result<(), Error>[src]

pub fn add_sentences_from_text(&mut self, text_name: &str, contents: &str)[src]

pub fn from_directory(path: &str) -> Result<SuffixTrie, Error>[src]

New suffix trie containing the suffixes of each sentence from each file in the given directory

pub fn find_edit_distance(&self, pattern: &str, max_errors: usize) -> Vec<Match>[src]

pub fn find_edit_distance_ignore(
    &self,
    pattern: &str,
    max_errors: usize,
    ignored_characters: HashMap<char, bool>,
    case_insensitive: bool
) -> Vec<Match>
[src]

pub fn find_exact(&self, pattern: &str, case_insensitive: bool) -> Vec<Match>[src]

Find all exact matches of the given pattern

pub fn get_strings_of_match(
    &self,
    match_obj: &Match,
    context_lines: usize
) -> (String, String, String)
[src]

pub fn get_text_names(&self) -> Vec<String>[src]

Trait Implementations

impl Debug for SuffixTrie[src]

impl<'de> Deserialize<'de> for SuffixTrie[src]

impl Serialize for SuffixTrie[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.