pub struct Codebook { /* private fields */ }Implementations§
Source§impl Codebook
impl Codebook
pub fn new(config: Arc<CodebookConfig>) -> Result<Self, Box<dyn Error>>
Sourcepub fn spell_check(
&self,
text: &str,
language: Option<LanguageType>,
file_path: Option<&str>,
) -> Vec<WordLocation>
pub fn spell_check( &self, text: &str, language: Option<LanguageType>, file_path: Option<&str>, ) -> Vec<WordLocation>
Get WordLocations for a block of text. Supply LanguageType, file path or both to use the correct code parser.
pub fn spell_check_file(&self, path: &str) -> Vec<WordLocation>
pub fn get_suggestions(&self, word: &str) -> Option<Vec<String>>
Auto Trait Implementations§
impl !Freeze for Codebook
impl !RefUnwindSafe for Codebook
impl Send for Codebook
impl Sync for Codebook
impl Unpin for Codebook
impl !UnwindSafe for Codebook
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more