Struct unidirs::UserDirs[][src]

pub struct UserDirs { /* fields omitted */ }
Expand description

Linux

TypeLocation
Cache$XDG_CACHE_HOME/<app> or $HOME/.cache/<app>
Config$XDG_CONFIG_HOME/<app> or $HOME/.config/<app>
Data$XDG_DATA_HOME/<app> or $HOME/.local/share/<app>

Mac OS

TypeLocation
Cache$HOME/Library/Caches/<qual>.<org>.<app>
Config$HOME/Library/Application Support/<qual>.<org>.<app>
Data$HOME/Library/Application Support/<qual>.<org>.<app>

Windows

TypeLocation
Cache%LOCALAPPDATA%\<org>\<app>\cache
Config%ROAMINGAPPDATA%\<org>\<app>\config
Data%ROAMINGAPPDATA%\<org>\<app>\data

Implementations

Create a new instance with the given qualifier, organization and application. These values are used to create a custom directory structure depending on the operating system standards.

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.