pub struct StorageConfig {
pub state_file: String,
}Fields§
§state_file: StringPath to state file for persistence
Implementations§
Source§impl StorageConfig
impl StorageConfig
Sourcepub fn get_default_state_file_path() -> String
pub fn get_default_state_file_path() -> String
Get the default state file path using XDG Base Directory specification Falls back to current directory if XDG data directory is not available
Sourcepub fn get_default_state_file_path_for_user(username: Option<&str>) -> String
pub fn get_default_state_file_path_for_user(username: Option<&str>) -> String
Get the default state file path for a specific user using XDG Base Directory specification Falls back to current directory if XDG data directory is not available
Sourcepub fn get_edit_log_path(state_file_path: &str) -> String
pub fn get_edit_log_path(state_file_path: &str) -> String
Get the edit log file path based on the state file path Uses the same directory as the state file but with a cleaner name
Trait Implementations§
Source§impl Clone for StorageConfig
impl Clone for StorageConfig
Source§fn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StorageConfig
impl Debug for StorageConfig
Source§impl Default for StorageConfig
impl Default for StorageConfig
Source§impl<'de> Deserialize<'de> for StorageConfig
impl<'de> Deserialize<'de> for StorageConfig
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
Auto Trait Implementations§
impl Freeze for StorageConfig
impl RefUnwindSafe for StorageConfig
impl Send for StorageConfig
impl Sync for StorageConfig
impl Unpin for StorageConfig
impl UnsafeUnpin for StorageConfig
impl UnwindSafe for StorageConfig
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