pub struct IniFile { /* private fields */ }
Expand description
Represents a system config file for the Glacier engine
§Example contents
[application]
ForceVSync=0
CapWorkerThreads=1
SCENE_FILE=assembly:/path/to/scene.entity
....
[Hitman5]
usegamecontroller=1
ConsoleCmd UI_EnableMouseEvents 0
....
Implementations§
Source§impl IniFile
impl IniFile
pub fn new(name: &str) -> Self
pub fn name(&self) -> String
pub fn sections(&self) -> &HashMap<String, IniFileSection>
pub fn includes(&self) -> &Vec<IniFile>
pub fn find_include(&self, include_name: &str) -> Option<&IniFile>
pub fn get_option( &self, section_name: &str, option_name: &str, ) -> Result<String, IniFileError>
pub fn set_value( &mut self, section_name: &str, option_name: &str, value: &str, ) -> Result<(), IniFileError>
pub fn push_console_command(&mut self, command: String)
pub fn console_cmds(&self) -> &Vec<String>
pub fn write_ini_file<W: Write>(&self, writer: &mut W)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IniFile
impl<'de> Deserialize<'de> for IniFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Index<&str> for IniFile
impl Index<&str> for IniFile
Source§type Output = IniFileSection
type Output = IniFileSection
The returned type after indexing.
Auto Trait Implementations§
impl Freeze for IniFile
impl RefUnwindSafe for IniFile
impl Send for IniFile
impl Sync for IniFile
impl Unpin for IniFile
impl UnwindSafe for IniFile
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more