pub struct ProjectPath<'a> {
pub qualifier: &'a str,
pub organization: &'a str,
pub application: &'a str,
}
Expand description
Your application’s metadata.
This is mainly used to figure out the system-level storage directory for your application.
See directories::ProjectDirs
for more information.
Fields§
§qualifier: &'a str
The qualifier of your application.
E.g. com
in com.GitHub.application
.
organization: &'a str
The organization name of your application.
E.g. GitHub
in com.GitHub.application
.
application: &'a str
Your application’s name.
E.g. application
in com.GitHub.application
.
Implementations§
Source§impl<'a> ProjectPath<'a>
impl<'a> ProjectPath<'a>
Sourcepub const fn new(
qualifier: &'a str,
organization: &'a str,
application: &'a str,
) -> Self
pub const fn new( qualifier: &'a str, organization: &'a str, application: &'a str, ) -> Self
Create a new ProjectPath
.
Sourcepub const fn with_qualifier(self, qualifier: &'a str) -> Self
pub const fn with_qualifier(self, qualifier: &'a str) -> Self
Modify the qualifier
field.
Sourcepub const fn with_organization(self, organization: &'a str) -> Self
pub const fn with_organization(self, organization: &'a str) -> Self
Modify the organization
field.
Sourcepub const fn with_application(self, application: &'a str) -> Self
pub const fn with_application(self, application: &'a str) -> Self
Modify the application
field.
Sourcepub fn sys_config_dir(&self) -> Option<PathBuf>
pub fn sys_config_dir(&self) -> Option<PathBuf>
Get the configuration directory of your application.
See directories::ProjectDirs::config_dir
for more information.
Sourcepub fn sys_preference_dir(&self) -> Option<PathBuf>
pub fn sys_preference_dir(&self) -> Option<PathBuf>
Get the preference directory of your application.
See directories::ProjectDirs::preference_dir
for more information.
Sourcepub fn sys_dir(&self, cfg_sys_type: ConfigType) -> Option<PathBuf>
pub fn sys_dir(&self, cfg_sys_type: ConfigType) -> Option<PathBuf>
Get the system-level config directory of your application.
Depends on ConfigOption.config_sys_type
:
Trait Implementations§
Source§impl<'a> Clone for ProjectPath<'a>
impl<'a> Clone for ProjectPath<'a>
Source§fn clone(&self) -> ProjectPath<'a>
fn clone(&self) -> ProjectPath<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<'a> Debug for ProjectPath<'a>
impl<'a> Debug for ProjectPath<'a>
Source§impl<'a> PartialEq for ProjectPath<'a>
impl<'a> PartialEq for ProjectPath<'a>
impl<'a> Eq for ProjectPath<'a>
impl<'a> StructuralPartialEq for ProjectPath<'a>
Auto Trait Implementations§
impl<'a> Freeze for ProjectPath<'a>
impl<'a> RefUnwindSafe for ProjectPath<'a>
impl<'a> Send for ProjectPath<'a>
impl<'a> Sync for ProjectPath<'a>
impl<'a> Unpin for ProjectPath<'a>
impl<'a> UnwindSafe for ProjectPath<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.