Skip to main content

SpellCheckService

Trait SpellCheckService 

Source
pub trait SpellCheckService {
    // Required method
    fn fetch_spell_check_suggestions(
        &self,
        app: &App,
        locale: &Locale,
        text: &str,
    ) -> Option<Vec<SuggestionSpan>>;
}
Expand description

Determines how spell check results are received for text input.

Required Methods§

Source

fn fetch_spell_check_suggestions( &self, app: &App, locale: &Locale, text: &str, ) -> Option<Vec<SuggestionSpan>>

Facilitates a spell check request.

Returns a Vec of SuggestionSpans for all misspelled words in the given str for the given Locale.

A return value of None indicates that fetching the spell check suggestions was unsuccessful. If fetching the suggestions succeeded but none were found, the result is an empty list.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§