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§
Source§impl<'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> !Freeze for App<'a>
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§
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
Mutably borrows from an owned value. Read more