[−][src]Struct glib::KeyFile
Methods
impl KeyFile
[src]
pub fn new() -> KeyFile
[src]
pub fn get_comment(
&self,
group_name: Option<&str>,
key: &str
) -> Result<GString, Error>
[src]
&self,
group_name: Option<&str>,
key: &str
) -> Result<GString, Error>
pub fn get_double(&self, group_name: &str, key: &str) -> Result<f64, Error>
[src]
pub fn get_double_list(
&self,
group_name: &str,
key: &str
) -> Result<Vec<f64>, Error>
[src]
&self,
group_name: &str,
key: &str
) -> Result<Vec<f64>, Error>
pub fn get_groups(&self) -> (Vec<GString>, usize)
[src]
pub fn get_int64(&self, group_name: &str, key: &str) -> Result<i64, Error>
[src]
pub fn get_integer(&self, group_name: &str, key: &str) -> Result<i32, Error>
[src]
pub fn get_integer_list(
&self,
group_name: &str,
key: &str
) -> Result<Vec<i32>, Error>
[src]
&self,
group_name: &str,
key: &str
) -> Result<Vec<i32>, Error>
pub fn get_keys(&self, group_name: &str) -> Result<(Vec<GString>, usize), Error>
[src]
pub fn get_locale_for_key(
&self,
group_name: &str,
key: &str,
locale: Option<&str>
) -> Option<GString>
[src]
&self,
group_name: &str,
key: &str,
locale: Option<&str>
) -> Option<GString>
pub fn get_start_group(&self) -> Option<GString>
[src]
pub fn get_uint64(&self, group_name: &str, key: &str) -> Result<u64, Error>
[src]
pub fn get_value(&self, group_name: &str, key: &str) -> Result<GString, Error>
[src]
pub fn has_group(&self, group_name: &str) -> bool
[src]
pub fn load_from_bytes(
&self,
bytes: &Bytes,
flags: KeyFileFlags
) -> Result<(), Error>
[src]
&self,
bytes: &Bytes,
flags: KeyFileFlags
) -> Result<(), Error>
pub fn load_from_data(
&self,
data: &str,
flags: KeyFileFlags
) -> Result<(), Error>
[src]
&self,
data: &str,
flags: KeyFileFlags
) -> Result<(), Error>
pub fn load_from_file<P: AsRef<Path>>(
&self,
file: P,
flags: KeyFileFlags
) -> Result<(), Error>
[src]
&self,
file: P,
flags: KeyFileFlags
) -> Result<(), Error>
pub fn remove_comment(
&self,
group_name: Option<&str>,
key: Option<&str>
) -> Result<(), Error>
[src]
&self,
group_name: Option<&str>,
key: Option<&str>
) -> Result<(), Error>
pub fn remove_group(&self, group_name: &str) -> Result<(), Error>
[src]
pub fn remove_key(&self, group_name: &str, key: &str) -> Result<(), Error>
[src]
pub fn set_boolean(&self, group_name: &str, key: &str, value: bool)
[src]
pub fn set_comment(
&self,
group_name: Option<&str>,
key: Option<&str>,
comment: &str
) -> Result<(), Error>
[src]
&self,
group_name: Option<&str>,
key: Option<&str>,
comment: &str
) -> Result<(), Error>
pub fn set_double(&self, group_name: &str, key: &str, value: f64)
[src]
pub fn set_int64(&self, group_name: &str, key: &str, value: i64)
[src]
pub fn set_integer(&self, group_name: &str, key: &str, value: i32)
[src]
pub fn set_list_separator(&self, separator: Char)
[src]
pub fn set_locale_string(
&self,
group_name: &str,
key: &str,
locale: &str,
string: &str
)
[src]
&self,
group_name: &str,
key: &str,
locale: &str,
string: &str
)
pub fn set_string(&self, group_name: &str, key: &str, string: &str)
[src]
pub fn set_uint64(&self, group_name: &str, key: &str, value: u64)
[src]
pub fn set_value(&self, group_name: &str, key: &str, value: &str)
[src]
impl KeyFile
[src]
pub fn save_to_file<T: AsRef<Path>>(&self, filename: T) -> Result<(), Error>
[src]
pub fn load_from_data_dirs<T: AsRef<Path>>(
&self,
file: T,
flags: KeyFileFlags
) -> Result<PathBuf, Error>
[src]
&self,
file: T,
flags: KeyFileFlags
) -> Result<PathBuf, Error>
pub fn load_from_dirs<T: AsRef<Path>, U: AsRef<Path>>(
&self,
file: T,
search_dirs: &[U],
flags: KeyFileFlags
) -> Result<PathBuf, Error>
[src]
&self,
file: T,
search_dirs: &[U],
flags: KeyFileFlags
) -> Result<PathBuf, Error>
pub fn to_data(&self) -> GString
[src]
pub fn get_boolean(&self, group_name: &str, key: &str) -> Result<bool, Error>
[src]
pub fn has_key(&self, group_name: &str, key: &str) -> Result<bool, Error>
[src]
pub fn get_boolean_list(
&self,
group_name: &str,
key: &str
) -> Result<Vec<bool>, Error>
[src]
&self,
group_name: &str,
key: &str
) -> Result<Vec<bool>, Error>
pub fn get_string(&self, group_name: &str, key: &str) -> Result<GString, Error>
[src]
pub fn get_string_list(
&self,
group_name: &str,
key: &str
) -> Result<Vec<GString>, Error>
[src]
&self,
group_name: &str,
key: &str
) -> Result<Vec<GString>, Error>
pub fn get_locale_string(
&self,
group_name: &str,
key: &str,
locale: Option<&str>
) -> Result<GString, Error>
[src]
&self,
group_name: &str,
key: &str,
locale: Option<&str>
) -> Result<GString, Error>
pub fn get_locale_string_list(
&self,
group_name: &str,
key: &str,
locale: Option<&str>
) -> Result<Vec<GString>, Error>
[src]
&self,
group_name: &str,
key: &str,
locale: Option<&str>
) -> Result<Vec<GString>, Error>
Trait Implementations
impl Clone for KeyFile
[src]
impl Debug for KeyFile
[src]
impl Default for KeyFile
[src]
impl Eq for KeyFile
[src]
impl Hash for KeyFile
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for KeyFile
[src]
fn cmp(&self, other: &KeyFile) -> Ordering
[src]
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<KeyFile> for KeyFile
[src]
impl PartialOrd<KeyFile> for KeyFile
[src]
fn partial_cmp(&self, other: &KeyFile) -> Option<Ordering>
[src]
fn lt(&self, other: &KeyFile) -> bool
[src]
fn le(&self, other: &KeyFile) -> bool
[src]
fn gt(&self, other: &KeyFile) -> bool
[src]
fn ge(&self, other: &KeyFile) -> bool
[src]
impl StaticType for KeyFile
[src]
fn static_type() -> Type
[src]
impl StructuralEq for KeyFile
[src]
impl StructuralPartialEq for KeyFile
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyFile
impl !Send for KeyFile
impl !Sync for KeyFile
impl Unpin for KeyFile
impl UnwindSafe for KeyFile
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
&'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
[src]
&'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
fn to_glib_container_from_slice(
&'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
[src]
&'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
fn to_glib_full_from_slice(&[T]) -> *const GList
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
&'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
[src]
&'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
fn to_glib_container_from_slice(
&'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
[src]
&'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
fn to_glib_full_from_slice(&[T]) -> *const GPtrArray
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
&'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
[src]
&'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
fn to_glib_container_from_slice(
&'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
[src]
&'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
fn to_glib_full_from_slice(&[T]) -> *mut GArray
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
&'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
[src]
&'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
fn to_glib_container_from_slice(
&'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
[src]
&'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
fn to_glib_full_from_slice(&[T]) -> *mut GList
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
&'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
[src]
&'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
fn to_glib_container_from_slice(
&'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
[src]
&'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
fn to_glib_full_from_slice(&[T]) -> *mut GPtrArray
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,