Struct appconfig::AppConfigManager[][src]

pub struct AppConfigManager<T> where
    T: Sized + Serialize + DeserializeOwned
{ /* fields omitted */ }

A manager that manages a single configuration file.

By default, the configuration file will be saved automatically when the manager is dropped. The name of the folder where the configuration file will be saved will be the FQDN consisting of the specified organization name and application name.

e.g. com.{organization_name}.{app_name}/app_config.toml

Implementations

impl<T> AppConfigManager<T> where
    T: Sized + Serialize + DeserializeOwned
[src]

pub fn new(
    data: Rc<RefCell<T>>,
    app_name: impl Into<String>,
    organization_name: impl Into<String>
) -> Self
[src]

pub fn set_skip_parsing_error_when_loading(&mut self, value: bool) -> &mut Self[src]

pub fn with_skip_parsing_error_when_loading(self, value: bool) -> Self[src]

pub fn set_auto_saving(&mut self, value: bool) -> &mut Self[src]

pub fn with_auto_saving(self, value: bool) -> Self[src]

pub fn set_organization_name(&mut self, value: impl Into<String>) -> &mut Self[src]

pub fn with_organization_name(self, value: impl Into<String>) -> Self[src]

pub fn set_app_name(&mut self, value: impl Into<String>) -> &mut Self[src]

pub fn with_app_name(self, value: impl Into<String>) -> Self[src]

pub fn load(&self) -> Result<(), Box<dyn Error>>[src]

pub fn save(&self) -> Result<(), Box<dyn Error>>[src]

Trait Implementations

impl<T> Drop for AppConfigManager<T> where
    T: Sized + Serialize + DeserializeOwned
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for AppConfigManager<T>

impl<T> !Send for AppConfigManager<T>

impl<T> !Sync for AppConfigManager<T>

impl<T> Unpin for AppConfigManager<T>

impl<T> !UnwindSafe for AppConfigManager<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.