#[repr(transparent)]pub struct KeyFile {
inner: Shared<GKeyFile, Self>,
}
Expand description
GLib type: Shared boxed type with reference counted clone semantics.
Fields§
§inner: Shared<GKeyFile, Self>
Implementations§
source§impl KeyFile
impl KeyFile
pub fn new() -> KeyFile
pub fn comment( &self, group_name: Option<&str>, key: Option<&str>, ) -> Result<GString, Error>
pub fn double(&self, group_name: &str, key: &str) -> Result<f64, Error>
pub fn double_list( &self, group_name: &str, key: &str, ) -> Result<Vec<f64>, Error>
pub fn int64(&self, group_name: &str, key: &str) -> Result<i64, Error>
pub fn integer(&self, group_name: &str, key: &str) -> Result<i32, Error>
pub fn integer_list( &self, group_name: &str, key: &str, ) -> Result<Vec<i32>, Error>
pub fn locale_for_key( &self, group_name: &str, key: &str, locale: Option<&str>, ) -> Option<GString>
pub fn start_group(&self) -> Option<GString>
pub fn uint64(&self, group_name: &str, key: &str) -> Result<u64, Error>
pub fn value(&self, group_name: &str, key: &str) -> Result<GString, Error>
pub fn has_group(&self, group_name: &str) -> bool
pub fn load_from_bytes( &self, bytes: &Bytes, flags: KeyFileFlags, ) -> Result<(), Error>
pub fn load_from_data( &self, data: &str, flags: KeyFileFlags, ) -> Result<(), Error>
pub fn load_from_file( &self, file: impl AsRef<Path>, flags: KeyFileFlags, ) -> Result<(), Error>
pub fn remove_comment( &self, group_name: Option<&str>, key: Option<&str>, ) -> Result<(), Error>
pub fn remove_group(&self, group_name: &str) -> Result<(), Error>
pub fn remove_key(&self, group_name: &str, key: &str) -> Result<(), Error>
pub fn set_boolean(&self, group_name: &str, key: &str, value: bool)
pub fn set_comment( &self, group_name: Option<&str>, key: Option<&str>, comment: &str, ) -> Result<(), Error>
pub fn set_double(&self, group_name: &str, key: &str, value: f64)
pub fn set_int64(&self, group_name: &str, key: &str, value: i64)
pub fn set_integer(&self, group_name: &str, key: &str, value: i32)
pub fn set_list_separator(&self, separator: Char)
pub fn set_locale_string( &self, group_name: &str, key: &str, locale: &str, string: &str, )
pub fn set_string(&self, group_name: &str, key: &str, string: &str)
pub fn set_uint64(&self, group_name: &str, key: &str, value: u64)
pub fn set_value(&self, group_name: &str, key: &str, value: &str)
source§impl KeyFile
impl KeyFile
pub fn save_to_file<T: AsRef<Path>>(&self, filename: T) -> Result<(), Error>
pub fn load_from_data_dirs<T: AsRef<Path>>( &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>
pub fn to_data(&self) -> GString
pub fn groups(&self) -> PtrSlice<GStringPtr>
pub fn keys(&self, group_name: &str) -> Result<PtrSlice<GStringPtr>, Error>
pub fn boolean(&self, group_name: &str, key: &str) -> Result<bool, Error>
pub fn has_key(&self, group_name: &str, key: &str) -> Result<bool, Error>
pub fn boolean_list( &self, group_name: &str, key: &str, ) -> Result<Vec<bool>, Error>
pub fn string(&self, group_name: &str, key: &str) -> Result<GString, Error>
pub fn string_list( &self, group_name: &str, key: &str, ) -> Result<PtrSlice<GStringPtr>, Error>
pub fn locale_string( &self, group_name: &str, key: &str, locale: Option<&str>, ) -> Result<GString, Error>
pub fn locale_string_list( &self, group_name: &str, key: &str, locale: Option<&str>, ) -> Result<PtrSlice<GStringPtr>, Error>
Trait Implementations§
source§impl HasParamSpec for KeyFile
impl HasParamSpec for KeyFile
source§impl Ord for KeyFile
impl Ord for KeyFile
source§impl PartialOrd for KeyFile
impl PartialOrd for KeyFile
source§impl StaticType for KeyFile
impl StaticType for KeyFile
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.impl Eq for KeyFile
impl StructuralPartialEq for KeyFile
Auto Trait Implementations§
impl Freeze for KeyFile
impl RefUnwindSafe for KeyFile
impl !Send for KeyFile
impl !Sync for KeyFile
impl Unpin for KeyFile
impl UnwindSafe for KeyFile
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.