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

Creates a new application.

Arguments
  • name: the name of the application.

returns: App

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.

Returns the path to this application’s cache.

Use this directory to store cached files such as downloads, intermediate files, etc.

Errors

Returns an Io if some directory couldn’t be created.

Returns the path to this application’s public documents.

Use this directory to store any content the user should see and alter.

Errors

Returns an Io if some directory couldn’t be created.

Returns the path to this application’s logs.

Use this directory to store all logs. The user can view and alter this directory.

Errors

Returns an Io if some directory couldn’t be created.

Returns the path to this application’s config.

Use this directory to store all configs for the current user. This directory is not intended for direct user access.

Errors

Returns an Io if some directory couldn’t be created.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.