pub trait PNSSpellServerDelegatewhere
Self: PNSObject,{
// Provided methods
fn spell_server_check_string_offset_types_options_orthography_word_count(
&self,
_sender: NSSpellServer,
_string_to_check: NSString,
_offset: UInt,
_checking_types: NSTextCheckingTypes,
_options: NSDictionary<NSString, id>,
_orthography: NSOrthography,
_word_count: Int,
) -> NSArray<NSTextCheckingResult> { ... }
fn spell_server_suggest_guesses_for_word_in_language(
&self,
_sender: NSSpellServer,
_word: NSString,
_language: NSString,
) -> NSArray<NSString> { ... }
fn spell_server_check_grammar_in_string_language_details(
&self,
_sender: NSSpellServer,
_string_to_check: NSString,
_language: NSString,
_details: NSArray<NSDictionary<NSString, id>>,
) -> NSRange { ... }
fn spell_server_find_misspelled_word_in_string_language_word_count_count_only(
&self,
_sender: NSSpellServer,
_string_to_check: NSString,
_language: NSString,
_word_count: Int,
_count_only: bool,
) -> NSRange { ... }
fn spell_server_did_forget_word_in_language(
&self,
_sender: NSSpellServer,
_word: NSString,
_language: NSString,
) { ... }
fn spell_server_did_learn_word_in_language(
&self,
_sender: NSSpellServer,
_word: NSString,
_language: NSString,
) { ... }
fn spell_server_suggest_completions_for_partial_word_range_in_string_language(
&self,
_sender: NSSpellServer,
_range: NSRange,
_string: NSString,
_language: NSString,
) -> NSArray<NSString> { ... }
fn spell_server_record_response_to_correction_for_word_language(
&self,
_sender: NSSpellServer,
_response: UInt,
_correction: NSString,
_word: NSString,
_language: NSString,
) { ... }
}
Expand description
The optional methods implemented by the delegate of a spell server.
Provided Methods§
Sourcefn spell_server_check_string_offset_types_options_orthography_word_count(
&self,
_sender: NSSpellServer,
_string_to_check: NSString,
_offset: UInt,
_checking_types: NSTextCheckingTypes,
_options: NSDictionary<NSString, id>,
_orthography: NSOrthography,
_word_count: Int,
) -> NSArray<NSTextCheckingResult>
fn spell_server_check_string_offset_types_options_orthography_word_count( &self, _sender: NSSpellServer, _string_to_check: NSString, _offset: UInt, _checking_types: NSTextCheckingTypes, _options: NSDictionary<NSString, id>, _orthography: NSOrthography, _word_count: Int, ) -> NSArray<NSTextCheckingResult>
Gives the delegate the opportunity to analyze both the spelling and grammar simultaneously, which is more efficient.
Sourcefn spell_server_suggest_guesses_for_word_in_language(
&self,
_sender: NSSpellServer,
_word: NSString,
_language: NSString,
) -> NSArray<NSString>
fn spell_server_suggest_guesses_for_word_in_language( &self, _sender: NSSpellServer, _word: NSString, _language: NSString, ) -> NSArray<NSString>
Gives the delegate the opportunity to suggest guesses to the sender for the correct spelling of the given misspelled word in the specified language.
Sourcefn spell_server_check_grammar_in_string_language_details(
&self,
_sender: NSSpellServer,
_string_to_check: NSString,
_language: NSString,
_details: NSArray<NSDictionary<NSString, id>>,
) -> NSRange
fn spell_server_check_grammar_in_string_language_details( &self, _sender: NSSpellServer, _string_to_check: NSString, _language: NSString, _details: NSArray<NSDictionary<NSString, id>>, ) -> NSRange
Gives the delegate the opportunity to customize the grammatical analysis of a given string.
Sourcefn spell_server_find_misspelled_word_in_string_language_word_count_count_only(
&self,
_sender: NSSpellServer,
_string_to_check: NSString,
_language: NSString,
_word_count: Int,
_count_only: bool,
) -> NSRange
fn spell_server_find_misspelled_word_in_string_language_word_count_count_only( &self, _sender: NSSpellServer, _string_to_check: NSString, _language: NSString, _word_count: Int, _count_only: bool, ) -> NSRange
Asks the delegate to search for a misspelled word in a given string, using the specified language, and marking the first misspelled word found by returning its range within the string.
Sourcefn spell_server_did_forget_word_in_language(
&self,
_sender: NSSpellServer,
_word: NSString,
_language: NSString,
)
fn spell_server_did_forget_word_in_language( &self, _sender: NSSpellServer, _word: NSString, _language: NSString, )
Notifies the delegate that the sender has removed the specified word from the user’s list of acceptable words in the specified language.
Sourcefn spell_server_did_learn_word_in_language(
&self,
_sender: NSSpellServer,
_word: NSString,
_language: NSString,
)
fn spell_server_did_learn_word_in_language( &self, _sender: NSSpellServer, _word: NSString, _language: NSString, )
Notifies the delegate that the sender has added the specified word to the user’s list of acceptable words in the specified language.
fn spell_server_suggest_completions_for_partial_word_range_in_string_language( &self, _sender: NSSpellServer, _range: NSRange, _string: NSString, _language: NSString, ) -> NSArray<NSString>
fn spell_server_record_response_to_correction_for_word_language( &self, _sender: NSSpellServer, _response: UInt, _correction: NSString, _word: NSString, _language: NSString, )
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.