pub struct Config {Show 17 fields
pub wow: Wow,
pub addons: Addons,
pub theme: Option<String>,
pub column_config: ColumnConfig,
pub window_size: Option<(u32, u32)>,
pub scale: Option<f64>,
pub backup_directory: Option<PathBuf>,
pub backup_addons: bool,
pub backup_wtf: bool,
pub hide_ignored_addons: bool,
pub self_update_channel: SelfUpdateChannel,
pub weak_auras_account: HashMap<Flavor, String>,
pub alternating_row_colors: bool,
pub language: Language,
pub catalog_source: Option<Source>,
pub auto_update: bool,
pub compression_format: CompressionFormat,
}Expand description
Config struct.
Fields§
§wow: Wow§addons: Addons§theme: Option<String>§column_config: ColumnConfig§window_size: Option<(u32, u32)>§scale: Option<f64>§backup_directory: Option<PathBuf>§backup_addons: bool§backup_wtf: bool§hide_ignored_addons: bool§self_update_channel: SelfUpdateChannel§weak_auras_account: HashMap<Flavor, String>§alternating_row_colors: bool§language: Language§catalog_source: Option<Source>§auto_update: bool§compression_format: CompressionFormatImplementations§
Source§impl Config
impl Config
Sourcepub fn get_flavor_directory_for_flavor(
&self,
flavor: &Flavor,
path: &Path,
) -> PathBuf
pub fn get_flavor_directory_for_flavor( &self, flavor: &Flavor, path: &Path, ) -> PathBuf
Returns a PathBuf to the flavor directory.
Sourcepub fn get_root_directory_for_flavor(&self, flavor: &Flavor) -> Option<PathBuf>
pub fn get_root_directory_for_flavor(&self, flavor: &Flavor) -> Option<PathBuf>
Returns a Option<PathBuf> to the root directory of the Flavor.
Sourcepub fn get_addon_directory_for_flavor(&self, flavor: &Flavor) -> Option<PathBuf>
pub fn get_addon_directory_for_flavor(&self, flavor: &Flavor) -> Option<PathBuf>
Returns a Option<PathBuf> to the directory containing the addons.
This will return None if no wow_directory is set in the config.
Sourcepub fn get_download_directory_for_flavor(
&self,
flavor: Flavor,
) -> Option<PathBuf>
pub fn get_download_directory_for_flavor( &self, flavor: Flavor, ) -> Option<PathBuf>
Returns a Option<PathBuf> to the directory which will hold the
temporary zip archives.
This will return None if flavor does not have a directory.
Sourcepub fn get_wtf_directory_for_flavor(&self, flavor: &Flavor) -> Option<PathBuf>
pub fn get_wtf_directory_for_flavor(&self, flavor: &Flavor) -> Option<PathBuf>
Returns a Option<PathBuf> to the WTF directory.
This will return None if no wow_directory is set in the config.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PersistentData for Config
impl PersistentData for Config
Source§fn relative_path() -> PathBuf
fn relative_path() -> PathBuf
Only method required to implement PersistentData on an object. Always relative to
the config folder for Ajour.
Source§fn path() -> Result<PathBuf, FilesystemError>
fn path() -> Result<PathBuf, FilesystemError>
Returns the full file path. Will create any parent directories that don’t
exist.
Source§fn load() -> Result<Self, FilesystemError>
fn load() -> Result<Self, FilesystemError>
Load from
PersistentData::path().Source§fn load_or_default<T: PersistentData + Default>() -> Result<T, FilesystemError>
fn load_or_default<T: PersistentData + Default>() -> Result<T, FilesystemError>
Load from
PersistentData::path(). If file doesn’t exist, save it to the filesystem as Default
and return that object.impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more