[−][src]Struct orbtk::prelude::Settings
Settings
represents a global settings service that could be use to serialize and deserialize
data in the ron
file format. Settings are stored in the user settings directory (depending on the operating system)
under the a folder with the given application name.
Implementations
impl Settings
[src]
pub fn new(app_name: impl Into<Box<str>>) -> Settings
[src]
Creates a new Settings
service with the given app name.
pub fn app_name(&self) -> &str
[src]
Gets the app name of the setting service.
pub fn save<S>(&self, key: &str, data: &S) -> Result<(), String> where
S: Serialize,
[src]
S: Serialize,
Serialize the given data object from user's config dir.
pub fn load<D>(&self, key: &str) -> Result<D, String> where
D: DeserializeOwned,
[src]
D: DeserializeOwned,
Loads and deserialize data from user's config dir.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<E> Component for E where
E: Any,
[src]
E: Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,