pub struct DbOpts {
pub prefix: String,
pub key: Option<String>,
pub migration: MigrationConfirmation,
}Expand description
Database options for a SimpleX chat instance.
§The prefix field
SimpleX stores each chat instance as a set of files sharing a common path prefix. The prefix is a directory path plus a filename stem: the directory part is created if absent, and the stem is prepended to every database filename.
prefix: "data/bot" - creates ./data/bot_agent.db, ./data/bot_chat.db
prefix: "bot" - creates ./bot_agent.db, ./bot_chat.db§Warning: overlapping prefixes
Two instances whose prefixes share the same directory and stem will silently read and write the same files. This will produce DB errors and may cause DB corruptions
Fields§
§prefix: String§key: Option<String>§migration: MigrationConfirmationImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DbOpts
impl RefUnwindSafe for DbOpts
impl Send for DbOpts
impl Sync for DbOpts
impl Unpin for DbOpts
impl UnsafeUnpin for DbOpts
impl UnwindSafe for DbOpts
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