Enum unidirs::UnifiedDirs[][src]

pub enum UnifiedDirs {
    Local(LocalDirs),
    Service(ServiceDirs),
    User(UserDirs),
}
Expand description

Unified directories provide a common interface over all different ways of constructing directory providers. It provides constructors for each variant.

The most significant function is UnifiedDirs::simple, giving an automatic selector for the right directory provider based on the way an application is run.

Variants

Local(LocalDirs)

Tuple Fields

Local directories for development.

Service(ServiceDirs)

Tuple Fields

Directories for applications run as service.

User(UserDirs)

Tuple Fields

User specific application folders.

Implementations

Shorthand to create unified dirs with LocalDirs as backend.

Shorthand to create LocalDirs backed unified dirs at a specific location.

Shorthand to create unified dirs with ServiceDirs as backend.

Shorthand to create unified dirs with UserDirs as backend.

Create a builder for unified directories that uses various detection techniques to select the right backend. See the SimpleBuilder implementation for more details about the used techniques.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The cache directory is a location where an application can save any temporary data. The contents can potentially be deleted by the system at any time. Therefore, the application must be able to work without these files or be able to re-create them. Read more

The config directory is where an application’s settings are stored. These are usually created by the user and loaded once at startup of the application. Read more

The data directory hold an application’s state data, like a database. The folder is expected to persist during the normal runtime of the OS. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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

Performs the conversion.

Performs the conversion.

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.