#[repr(C)]pub struct NSOrthography {
pub ptr: Id<Object>,
}Expand description
A description of the linguistic content of natural language text, typically used for spelling and grammar checking.
Fields§
§ptr: Id<Object>The raw pointer to the Objective-C object.
Implementations§
Source§impl NSOrthography
impl NSOrthography
Sourcepub fn default_orthography_for_language(language: NSString) -> Self
pub fn default_orthography_for_language(language: NSString) -> Self
Creates and returns an orthography object with the default language map for the specified language.
Sourcepub fn init_with_dominant_script_language_map(
&mut self,
script: NSString,
map: NSDictionary<NSString, NSArray<NSString>>,
) -> Self
pub fn init_with_dominant_script_language_map( &mut self, script: NSString, map: NSDictionary<NSString, NSArray<NSString>>, ) -> Self
Creates an orthography object with the specified dominant script and language map.
Sourcepub fn orthography_with_dominant_script(
script: NSString,
map: NSDictionary<NSString, NSArray<NSString>>,
) -> Self
pub fn orthography_with_dominant_script( script: NSString, map: NSDictionary<NSString, NSArray<NSString>>, ) -> Self
Creates and returns an orthography object with the specified dominant script and language map.
Sourcepub fn language_map(&self) -> NSDictionary<NSString, NSArray<NSString>>
pub fn language_map(&self) -> NSDictionary<NSString, NSArray<NSString>>
A dictionary that maps script tags to arrays of language tags.
Sourcepub fn dominant_language(&self) -> NSString
pub fn dominant_language(&self) -> NSString
The first language in the list of languages for the dominant script.
Sourcepub fn dominant_script(&self) -> NSString
pub fn dominant_script(&self) -> NSString
The dominant script for the text.
Sourcepub fn dominant_language_for_script(&self, script: NSString) -> NSString
pub fn dominant_language_for_script(&self, script: NSString) -> NSString
Returns the dominant language for the specified script.
Sourcepub fn languages_for_script(&self, script: NSString) -> NSArray<NSString>
pub fn languages_for_script(&self, script: NSString) -> NSArray<NSString>
Returns the list of languages for the specified script.
Sourcepub fn all_scripts(&self) -> NSArray<NSString>
pub fn all_scripts(&self) -> NSArray<NSString>
The scripts appearing as keys in the language map.
Sourcepub fn all_languages(&self) -> NSArray<NSString>
pub fn all_languages(&self) -> NSArray<NSString>
The languages appearing in values of the language map.
Methods from Deref<Target = Object>§
Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar of self with the given name.
Panics if self has no ivar with the given name.
Unsafe because the caller must ensure that the ivar is actually
of type T.