pub struct KeyFile(_);
Implementations
sourceimpl KeyFile
impl KeyFile
pub fn new() -> KeyFile
pub fn get_comment<'a, P: Into<Option<&'a str>>>(
&self,
group_name: P,
key: &str
) -> Result<String, Error>
pub fn get_double(&self, group_name: &str, key: &str) -> Result<f64, Error>
pub fn get_double_list(
&self,
group_name: &str,
key: &str
) -> Result<Vec<f64>, Error>
pub fn get_groups(&self) -> (Vec<String>, usize)
pub fn get_int64(&self, group_name: &str, key: &str) -> Result<i64, Error>
pub fn get_integer(&self, group_name: &str, key: &str) -> Result<i32, Error>
pub fn get_integer_list(
&self,
group_name: &str,
key: &str
) -> Result<Vec<i32>, Error>
pub fn get_keys(&self, group_name: &str) -> Result<(Vec<String>, usize), Error>
pub fn get_locale_string<'a, P: Into<Option<&'a str>>>(
&self,
group_name: &str,
key: &str,
locale: P
) -> Result<String, Error>
pub fn get_locale_string_list<'a, P: Into<Option<&'a str>>>(
&self,
group_name: &str,
key: &str,
locale: P
) -> Result<Vec<String>, Error>
pub fn get_start_group(&self) -> Option<String>
pub fn get_string(&self, group_name: &str, key: &str) -> Result<String, Error>
pub fn get_string_list(
&self,
group_name: &str,
key: &str
) -> Result<Vec<String>, Error>
pub fn get_uint64(&self, group_name: &str, key: &str) -> Result<u64, Error>
pub fn get_value(&self, group_name: &str, key: &str) -> Result<String, Error>
pub fn has_group(&self, group_name: &str) -> bool
pub fn load_from_data(&self, data: &str, flags: KeyFileFlags) -> Result<(), Error>
pub fn load_from_file<P: AsRef<Path>>(
&self,
file: P,
flags: KeyFileFlags
) -> Result<(), Error>
pub fn remove_comment<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(
&self,
group_name: P,
key: Q
) -> 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<'a, 'b, P: Into<Option<&'a str>>, Q: Into<Option<&'b str>>>(
&self,
group_name: P,
key: Q,
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)
sourceimpl KeyFile
impl KeyFile
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) -> String
pub fn get_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 get_boolean_list(
&self,
group_name: &str,
key: &str
) -> Result<Vec<bool>, Error>
Trait Implementations
sourceimpl Ord for KeyFile
impl Ord for KeyFile
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<KeyFile> for KeyFile
impl PartialOrd<KeyFile> for KeyFile
sourcefn partial_cmp(&self, other: &KeyFile) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyFile) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl StaticType for KeyFile
impl StaticType for KeyFile
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.impl Eq for KeyFile
impl StructuralEq for KeyFile
impl StructuralPartialEq for KeyFile
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more