pub struct FilesystemStorage { /* private fields */ }Expand description
Filesystem-based storage for non-secure data or fallback
§⚠️ Security Warning
DO NOT use this storage backend for sensitive data like authentication tokens! Data is stored unencrypted on disk.
For secure token storage, use:
KeyringStoragefor OS keychain storage (preferred)EncryptedFilesystemStoragefor encrypted file storage (fallback)
This implementation is only suitable for:
- Non-sensitive configuration data
- Development and testing
- Temporary files and caches
Implementations§
Trait Implementations§
Source§impl StorageBackend for FilesystemStorage
impl StorageBackend for FilesystemStorage
Source§fn write_file_str(
&self,
path: &str,
data: &[u8],
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + '_>>
fn write_file_str( &self, path: &str, data: &[u8], ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + '_>>
Write data to storage at the specified path
Source§fn read_file_str(
&self,
path: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + '_>>
fn read_file_str( &self, path: &str, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + '_>>
Read data from storage at the specified path
Source§fn exists_str(&self, path: &str) -> bool
fn exists_str(&self, path: &str) -> bool
Check if a file exists at the specified path
Auto Trait Implementations§
impl Freeze for FilesystemStorage
impl RefUnwindSafe for FilesystemStorage
impl Send for FilesystemStorage
impl Sync for FilesystemStorage
impl Unpin for FilesystemStorage
impl UnwindSafe for FilesystemStorage
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