LocationType

Enum LocationType 

Source
pub enum LocationType {
Show 19 variants HomeLocation, DesktopLocation, DocumentsLocation, DownloadLocation, MoviesLocation, MusicLocation, PicturesLocation, ApplicationsLocation, FontsLocation, RuntimeLocation, TempLocation, GenericDataLocation, AppDataLocation, AppLocalDataLocation, GenericCacheLocation, AppCacheLocation, ConfigLocation, GenericConfigLocation, AppConfigLocation,
}
Expand description

Enumerates the standard location type.

Is used to call StandardPaths::writable_location and StandardPaths::find_executable_in_paths.

Some of the values are used to acquire user-specific paths, some are application-specific and some are system-wide.

Variants§

§

HomeLocation

The user’s home directory.

  • On Linux systems it’s equal to the $HOME environment variable.
  • On the last Windows operating systems it’s equal to the %HomePath% environment variable.
§

DesktopLocation

The user’s desktop directory.

§

DocumentsLocation

The user’s documents directory.

§

DownloadLocation

The directory for the user’s downloaded files.

This is a generic value. On Windows if no such directory exists, the directory for storing user documents is returned.

§

MoviesLocation

The user’s movies and videos directory.

§

MusicLocation

The user’s music, recordings and other audio files directory.

§

PicturesLocation

The user’s pictures, photos and screenshots directory.

§

ApplicationsLocation

The user’s applications directory.

It might contain either executables, desktop files, or shortcuts.

It’s a platform-specific value.

§

FontsLocation

The user’s fonts directory.

§

RuntimeLocation

The directory for the runtime communication files (like Unix local sockets).

This is a generic value. It could returns None on some systems.

§

TempLocation

A directory for storing temporary files.

It might be application-specific, user-specific or system-wide.

§

GenericDataLocation

The directory for the persistent data shared across applications.

This is a generic value.

§

AppDataLocation

The persistent application data directory.

This is an application-specific directory. On the Windows operating system, this returns the roaming path.

§

AppLocalDataLocation

The local settings directory.

This is a Windows-specific value. On all other platforms, it returns the same value as LocationType::AppDataLocation.

§

GenericCacheLocation

The directory for the user-specific cached data shared across applications.

This is a generic value. It could returns None from the appropriate methods if the system has no concept of shared cache.

§

AppCacheLocation

The user-specific cached data directory.

This is an application-specific directory.

§

ConfigLocation

The user-specific configuration files directory.

This may be either a generic value or application-specific.

§

GenericConfigLocation

The user-specific configuration files directory. shared between multiple applications.

This is a generic value.

§

AppConfigLocation

The user-specific configuration files directory.

This is an application-specific value.

Trait Implementations§

Source§

impl Clone for LocationType

Source§

fn clone(&self) -> LocationType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LocationType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for LocationType

Source§

fn eq(&self, other: &LocationType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for LocationType

Source§

impl Eq for LocationType

Source§

impl StructuralPartialEq for LocationType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.