pub struct LanguagePersistence;Expand description
Verwaltet das Speichern/Laden von Language-Konfigurationen
Implementations§
Source§impl LanguagePersistence
impl LanguagePersistence
Sourcepub async fn save_to_config(lang: &str) -> Result<()>
pub async fn save_to_config(lang: &str) -> Result<()>
Speichert Sprache in Config-Datei (von screen.rs übernommen)
Sourcepub async fn load_from_config() -> Result<Option<String>>
pub async fn load_from_config() -> Result<Option<String>>
Lädt Sprache aus Config-Datei
Sourcepub fn config_exists() -> bool
pub fn config_exists() -> bool
Überprüft ob Config-Datei existiert
Sourcepub fn get_config_paths() -> Vec<PathBuf>
pub fn get_config_paths() -> Vec<PathBuf>
Gibt alle möglichen Config-Pfade zurück
Sourcepub async fn backup_config() -> Result<Option<PathBuf>>
pub async fn backup_config() -> Result<Option<PathBuf>>
Erstellt Backup der aktuellen Config vor Language-Änderung
Auto Trait Implementations§
impl Freeze for LanguagePersistence
impl RefUnwindSafe for LanguagePersistence
impl Send for LanguagePersistence
impl Sync for LanguagePersistence
impl Unpin for LanguagePersistence
impl UnwindSafe for LanguagePersistence
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> 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