[][src]Struct orbtk::prelude::Settings

pub struct Settings { /* fields omitted */ }

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]

Serialize the given data object from user's config dir.

pub fn load<D>(&self, key: &str) -> Result<D, String> where
    D: DeserializeOwned
[src]

Loads and deserialize data from user's config dir.

Trait Implementations

impl Default for Settings[src]

Auto Trait Implementations

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<E> Component for E where
    E: Any
[src]

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

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

impl<T> SetParameter for T

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,