Struct appconfig::AppConfigManager [−][src]
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]
T: Sized + Serialize + DeserializeOwned,
pub fn new(
data: Rc<RefCell<T>>,
app_name: impl Into<String>,
organization_name: impl Into<String>
) -> Self[src]
data: Rc<RefCell<T>>,
app_name: impl Into<String>,
organization_name: impl Into<String>
) -> Self
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]
T: Sized + Serialize + DeserializeOwned,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,