pub struct FirstRunHandler;Expand description
First-run handler for storage initialization
Implementations§
Source§impl FirstRunHandler
impl FirstRunHandler
Sourcepub fn is_first_run(global_path: &Path) -> StorageResult<bool>
pub fn is_first_run(global_path: &Path) -> StorageResult<bool>
Check if this is the first run
Returns true if the marker file doesn’t exist in the global storage path
Sourcepub fn mark_first_run_complete(global_path: &Path) -> StorageResult<()>
pub fn mark_first_run_complete(global_path: &Path) -> StorageResult<()>
Mark the first run as complete
Creates the marker file to indicate initialization is done
Sourcepub fn get_suggested_path() -> StorageResult<PathBuf>
pub fn get_suggested_path() -> StorageResult<PathBuf>
Get the suggested global storage path
Returns the path that would be used for global storage
Sourcepub fn detect_first_run() -> StorageResult<bool>
pub fn detect_first_run() -> StorageResult<bool>
Detect first-time initialization
Returns true if:
- The global storage directory doesn’t exist, OR
- The marker file doesn’t exist in the global storage directory
Auto Trait Implementations§
impl Freeze for FirstRunHandler
impl RefUnwindSafe for FirstRunHandler
impl Send for FirstRunHandler
impl Sync for FirstRunHandler
impl Unpin for FirstRunHandler
impl UnwindSafe for FirstRunHandler
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