[−][src]Struct spyglass::SuffixTrie
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]
&self,
pattern: &str,
max_errors: usize,
ignored_characters: HashMap<char, bool>,
case_insensitive: bool
) -> Vec<Match>
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]
&self,
match_obj: &Match,
context_lines: usize
) -> (String, String, String)
pub fn get_text_names(&self) -> Vec<String>
[src]
Trait Implementations
impl Debug for SuffixTrie
[src]
impl<'de> Deserialize<'de> for SuffixTrie
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for SuffixTrie
[src]
Auto Trait Implementations
impl RefUnwindSafe for SuffixTrie
[src]
impl Send for SuffixTrie
[src]
impl Sync for SuffixTrie
[src]
impl Unpin for SuffixTrie
[src]
impl UnwindSafe for SuffixTrie
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,