pub struct App<'a> { /* private fields */ }
Expand description
Represents the application’s directories.
Main entry point to obtain any directory for your application.
These APIs will fail as last resort. If they fail it usually means the system has a problem. The system may also include specific configuration to break applications on purpose, in which case these APIs will also fail.
Implementations
sourceimpl<'a> App<'a>
impl<'a> App<'a>
sourcepub fn get_data(&self) -> Result<&Path, Error>
pub fn get_data(&self) -> Result<&Path, Error>
Returns the path to this application’s files.
Use this directory to store any information not intended to be user accessible.
Errors
Returns a MissingDataDir if this system doesn’t have any application writable location; this should never occur on any supported system except if such system is broken.
Returns an Io if some directory couldn’t be created.
sourcepub fn get_documents(&self) -> Result<&Path, Error>
pub fn get_documents(&self) -> Result<&Path, Error>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for App<'a>
impl<'a> Send for App<'a>
impl<'a> Sync for App<'a>
impl<'a> Unpin for App<'a>
impl<'a> UnwindSafe for App<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more