[−][src]Struct rspell::LangProvider
A structure to ensure that the data files for the given language are available.
It can look for files on the disk or download directly from internet when possible.
Methods
impl<'_> LangProvider<'_>[src]
pub fn new<'a>(lang: &'a str, config: &'a Config) -> LangProvider<'a>[src]
Creates a new LanguageProvider for the given language and configuration.
The configuration can be loaded using load_config().
pub fn aff(&self) -> &Path[src]
Location of the .aff dictionary.
pub fn aff_on_disk(&self) -> Vec<PathBuf>[src]
Search for corresponding .aff dictionaries on the disk.
pub fn dic(&self) -> &Path[src]
Location of the .dic dictionary.
pub fn dic_on_disk(&self) -> Vec<PathBuf>[src]
Search for corresponding .dic dictionaries on the disk.
pub fn ensure_data(&self) -> Result<(), SpellError>[src]
Ensures that the dictionaries are present in the dictionaries directory.
If one of the dictionaries is absent it will be fetched from the disk or directly from internet when possible.
pub fn remove_data(&self) -> Result<(), SpellError>[src]
Removes the dictionaries from the dictionaries directory.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for LangProvider<'a>
impl<'a> Send for LangProvider<'a>
impl<'a> Sync for LangProvider<'a>
impl<'a> Unpin for LangProvider<'a>
impl<'a> UnwindSafe for LangProvider<'a>
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,
fn borrow_mut(&mut self) -> &mut T[src]
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.
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>,