pub struct IosStorageBackend { /* private fields */ }Expand description
iOS storage backend stub. Production: NSUserDefaults (KV) + Keychain (secure) + FileManager (files).
Implementations§
Trait Implementations§
Source§impl StorageBackend for IosStorageBackend
impl StorageBackend for IosStorageBackend
Source§fn platform_id(&self) -> &str
fn platform_id(&self) -> &str
Platform identifier for this backend.
Source§fn get(
&self,
ns: &StorageNamespace,
key: &str,
) -> StorageResult<Option<StorageValue>>
fn get( &self, ns: &StorageNamespace, key: &str, ) -> StorageResult<Option<StorageValue>>
Get a value by key within a namespace.
Source§fn set(
&self,
ns: &StorageNamespace,
key: &str,
value: StorageValue,
) -> StorageResult<()>
fn set( &self, ns: &StorageNamespace, key: &str, value: StorageValue, ) -> StorageResult<()>
Set a value by key within a namespace.
Source§fn delete(&self, ns: &StorageNamespace, key: &str) -> StorageResult<()>
fn delete(&self, ns: &StorageNamespace, key: &str) -> StorageResult<()>
Delete a key within a namespace.
Source§fn keys(&self, ns: &StorageNamespace) -> StorageResult<Vec<String>>
fn keys(&self, ns: &StorageNamespace) -> StorageResult<Vec<String>>
List all keys in a namespace.
Source§fn clear(&self, ns: &StorageNamespace) -> StorageResult<()>
fn clear(&self, ns: &StorageNamespace) -> StorageResult<()>
Clear all keys in a namespace.
Source§fn supports_secure(&self) -> bool
fn supports_secure(&self) -> bool
Whether this platform supports secure storage (Keychain, Keystore, etc.).
Source§fn secure_set(&self, key: &str, value: &[u8]) -> StorageResult<()>
fn secure_set(&self, key: &str, value: &[u8]) -> StorageResult<()>
Store a value securely (e.g., iOS Keychain, Android Keystore).
Source§fn secure_get(&self, key: &str) -> StorageResult<Option<Vec<u8>>>
fn secure_get(&self, key: &str) -> StorageResult<Option<Vec<u8>>>
Retrieve a securely stored value.
Source§fn secure_delete(&self, key: &str) -> StorageResult<()>
fn secure_delete(&self, key: &str) -> StorageResult<()>
Delete a securely stored value.
Source§fn write_file(&self, path: &str, data: &[u8]) -> StorageResult<()>
fn write_file(&self, path: &str, data: &[u8]) -> StorageResult<()>
Write bytes to a file path (relative to app sandbox).
Source§fn read_file(&self, path: &str) -> StorageResult<Vec<u8>>
fn read_file(&self, path: &str) -> StorageResult<Vec<u8>>
Read bytes from a file path (relative to app sandbox).
Source§fn delete_file(&self, path: &str) -> StorageResult<()>
fn delete_file(&self, path: &str) -> StorageResult<()>
Delete a file.
Source§fn file_exists(&self, path: &str) -> StorageResult<bool>
fn file_exists(&self, path: &str) -> StorageResult<bool>
Check if a file exists.
Source§fn list_files(&self, dir: &str) -> StorageResult<Vec<String>>
fn list_files(&self, dir: &str) -> StorageResult<Vec<String>>
List files in a directory (relative to app sandbox).
Source§fn contains(
&self,
namespace: &StorageNamespace,
key: &str,
) -> StorageResult<bool>
fn contains( &self, namespace: &StorageNamespace, key: &str, ) -> StorageResult<bool>
Check if a key exists within a namespace.
Auto Trait Implementations§
impl !Freeze for IosStorageBackend
impl RefUnwindSafe for IosStorageBackend
impl Send for IosStorageBackend
impl Sync for IosStorageBackend
impl Unpin for IosStorageBackend
impl UnsafeUnpin for IosStorageBackend
impl UnwindSafe for IosStorageBackend
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