pub enum ZeroStorage {
Memory,
Sqlite {
directory: Option<PathBuf>,
},
Custom(Rc<dyn StorageBackend>),
}Expand description
Where a client keeps its replica (ZeroStorage in zero-swift,
kvStore in JS).
Variants§
Memory
Memory only, kept for the life of the thread: a client created later
with the same options finds what an earlier one stored, as with JS
kvStore: 'mem'. Nothing survives a restart.
Sqlite
A SQLite database file per database name in directory. The default
directory is ~/Library/Application Support/Zero on macOS,
%LOCALAPPDATA%\Zero on Windows, and $XDG_DATA_HOME/zero (or
~/.local/share/zero) elsewhere.
Custom(Rc<dyn StorageBackend>)
A store the app brings.
Trait Implementations§
Source§impl Clone for ZeroStorage
impl Clone for ZeroStorage
Source§impl Debug for ZeroStorage
impl Debug for ZeroStorage
Auto Trait Implementations§
impl !RefUnwindSafe for ZeroStorage
impl !Send for ZeroStorage
impl !Sync for ZeroStorage
impl !UnwindSafe for ZeroStorage
impl Forget for ZeroStorage
impl Freeze for ZeroStorage
impl Move for ZeroStorage
impl Unpin for ZeroStorage
impl UnsafeUnpin for ZeroStorage
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