Trait SettingCollectionTrait

Source
pub trait SettingCollectionTrait<T> {
    // Required methods
    fn insert_setting(&mut self, setting: &mut T);
    fn remove_setting(&mut self, setting: &mut T);
    fn write_setting(&mut self, setting: &mut T) -> bool;
    fn read_setting(&mut self, setting: &mut T) -> bool;
    fn open_handle(&mut self, create: bool) -> bool;
    fn close_handle(&mut self) -> bool;
    fn unk_07(&mut self);
    fn write_all_settings(&mut self);
    fn read_all_settings(&mut self);
}
Expand description

Trait representing the SettingCollection behavior.

This trait defines the collection operations for generic settings.

Required Methods§

Source

fn insert_setting(&mut self, setting: &mut T)

Inserts a setting into the collection.

§Arguments
  • setting: The setting to insert.
Source

fn remove_setting(&mut self, setting: &mut T)

Removes a setting from the collection.

§Arguments
  • setting: The setting to remove.
Source

fn write_setting(&mut self, setting: &mut T) -> bool

Writes a setting to the collection.

§Arguments
  • setting: The setting to write.
§Returns
  • true if the write was successful.
  • false otherwise.
Source

fn read_setting(&mut self, setting: &mut T) -> bool

Reads a setting from the collection.

§Arguments
  • setting: The setting to read.
§Returns
  • true if the read was successful.
  • false otherwise.
Source

fn open_handle(&mut self, create: bool) -> bool

Opens the handle for the collection.

§Arguments
  • create: Whether to create the handle.
§Returns
  • true if the handle was opened successfully.
  • false otherwise.
Source

fn close_handle(&mut self) -> bool

Closes the handle for the collection.

§Returns
  • true if the handle was closed successfully.
Source

fn unk_07(&mut self)

Unknown operation 0x07.

Source

fn write_all_settings(&mut self)

Writes all settings.

Source

fn read_all_settings(&mut self)

Reads all settings.

Implementors§