pub struct OfflineModeHandler;Expand description
Offline mode handler
Implementations§
Source§impl OfflineModeHandler
impl OfflineModeHandler
Sourcepub fn check_storage_availability(storage_path: &Path) -> StorageState
pub fn check_storage_availability(storage_path: &Path) -> StorageState
Sourcepub fn is_external_storage(storage_path: &Path) -> bool
pub fn is_external_storage(storage_path: &Path) -> bool
Sourcepub fn enter_offline_mode(
storage_path: &Path,
cache_available: bool,
) -> StorageState
pub fn enter_offline_mode( storage_path: &Path, cache_available: bool, ) -> StorageState
Sourcepub fn retry_storage_access(storage_path: &Path) -> bool
pub fn retry_storage_access(storage_path: &Path) -> bool
Sourcepub fn log_offline_warning(storage_path: &Path, reason: &str)
pub fn log_offline_warning(storage_path: &Path, reason: &str)
Log offline mode warning
§Arguments
storage_path- Path to storage directoryreason- Reason for offline mode
Sourcepub fn validate_offline_mode(cache_available: bool) -> StorageResult<()>
pub fn validate_offline_mode(cache_available: bool) -> StorageResult<()>
Auto Trait Implementations§
impl Freeze for OfflineModeHandler
impl RefUnwindSafe for OfflineModeHandler
impl Send for OfflineModeHandler
impl Sync for OfflineModeHandler
impl Unpin for OfflineModeHandler
impl UnwindSafe for OfflineModeHandler
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