pub struct Autocomplete { /* private fields */ }Implementations§
Source§impl Autocomplete
impl Autocomplete
pub async fn build( language: Option<String>, thread_count: Option<u8>, max_suggestion: Option<u8>, has_backup: bool, backup_path: Option<&str>, ) -> Result<Self, Box<dyn Error>>
pub async fn load_backup(&mut self) -> Result<(), Box<dyn Error>>
pub async fn insert_word(&mut self, word: String) -> Result<(), Box<dyn Error>>
pub async fn suggest_word( &self, prefix: &str, ) -> Result<Vec<String>, Box<dyn Error>>
Auto Trait Implementations§
impl Freeze for Autocomplete
impl !RefUnwindSafe for Autocomplete
impl Send for Autocomplete
impl Sync for Autocomplete
impl Unpin for Autocomplete
impl !UnwindSafe for Autocomplete
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