Skip to main content

LanguageExt

Trait LanguageExt 

Source
pub trait LanguageExt: IsA<Language> + 'static {
    // Provided methods
    fn code(&self) -> Option<GString> { ... }
    fn name(&self) -> Option<GString> { ... }
    fn territory(&self) -> Option<GString> { ... }
    fn matches(&self, code: &str) -> bool { ... }
    fn connect_name_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_territory_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Language methods.

§Implementors

Language

Provided Methods§

Source

fn code(&self) -> Option<GString>

Get the code of a language (e.g. “de_DE.UTF-8”)

§Returns

The code of the language

Source

fn name(&self) -> Option<GString>

Get the name of a language.

§Returns

The name of the language

Source

fn territory(&self) -> Option<GString>

Get the territory the language is used in.

§Returns

The territory the language is used in.

Source

fn matches(&self, code: &str) -> bool

Check if a language code matches this language.

§code

A language code

§Returns

#TRUE if the code matches this language.

Source

fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_territory_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

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.

Implementors§

Source§

impl<O: IsA<Language>> LanguageExt for O