pub fn new(project_name: &'static str) -> Result<Self> {
        match dirs::config_dir() {
            Some(base_dirs) => {
                let root_path = base_dirs;
                Ok(Self {
                    path: root_path,
                    project_name,
                    config_name: "config",
                    file_extension: "json",
                    project_suffix: "rs",
                    pretty: false,
                    #[cfg(feature = "crypto")]
                    encryption_key: None,
                    #[cfg(feature = "compression")]
                    compressed: false,
                })
            }
            None => Err(Error::ConfigDir),
        }
    }
/// Creates a new instance of the store requiring the project's name.
/// This name will be used as the folder name to store the configuration data.
/// The default store location is the application configuration directory.
///
/// See [dirs::config_dir][dirs::config_dir] for more information.
///
/// # Example
///
/// ```rust
/// # use bland::Store;
/// let store = Store::new("my-app").unwrap();
/// ```
Creates a new instance of the store requiring the project's name.
This name will be used as the folder name to store the configuration data.
The default store location is the application configuration directory.


Creates a new instance of the store requiring the project ' s name . This name will be used as the folder name to store the configuration data . The default store location is the application configuration directory .
pub fn new(project_name: &'static str) -> Result<Self> {
        match dirs::config_dir() {
            Some(base_dirs) => {
                let root_path = base_dirs;
                Ok(Self {
                    path: root_path,
                    project_name,
                    config_name: "config",
                    file_extension: "json",
                    project_suffix: "rs",
                    pretty: false,
                    #[cfg(feature = "crypto")]
                    encryption_key: None,
                    #[cfg(feature = "compression")]
                    compressed: false,
                })
            }
            None => Err(Error::ConfigDir),
        }
    }
pub fn new ( project_name : & ' static str ) -> Result < Self > { match dirs :: config_dir ( ) { Some ( base_dirs ) => { let root_path = base_dirs ; Ok ( Self { path : root_path , project_name , config_name : " " , file_extension : " " , project_suffix : " " , pretty : false , # [ cfg ( feature " " ) ] encryption_key : None , # [ cfg ( feature " " ) ] compressed : false , } ) } None => Err ( Error :: ConfigDir ) , } }
Creates a new instance of the store requiring the project's name.
Creates a new instance of the store requiring the project ' s name .
project_name
&'static str
project_name
&'static str
example
None
use bland::store;
None