Skip to main content

KeyFileExt

Trait KeyFileExt 

Source
pub trait KeyFileExt {
    // Required methods
    fn optional_string(
        &self,
        group: &str,
        key: &str,
    ) -> Result<Option<GString>, Error>;
    fn optional_bool(
        &self,
        group: &str,
        key: &str,
    ) -> Result<Option<bool>, Error>;
}
Expand description

Helper methods for [glib::KeyFile].

Required Methods§

Source

fn optional_string( &self, group: &str, key: &str, ) -> Result<Option<GString>, Error>

Get a string value, but return None if the key does not exist.

Source

fn optional_bool(&self, group: &str, key: &str) -> Result<Option<bool>, Error>

Get a boolean value, but return None if the key does not exist.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl KeyFileExt for KeyFile

Source§

fn optional_string( &self, group: &str, key: &str, ) -> Result<Option<GString>, Error>

Source§

fn optional_bool(&self, group: &str, key: &str) -> Result<Option<bool>, Error>

Implementors§