pub struct DatabaseOptions {
pub path: DatabasePath,
pub read_only: bool,
pub create_if_missing: bool,
pub apply_default_pragmas: bool,
pub custom_pragmas: Vec<(String, String)>,
pub busy_timeout: Option<Duration>,
}Fields§
§path: DatabasePath§read_only: bool§create_if_missing: bool§apply_default_pragmas: bool§custom_pragmas: Vec<(String, String)>§busy_timeout: Option<Duration>Implementations§
Source§impl DatabaseOptions
impl DatabaseOptions
pub fn in_memory() -> Self
pub fn with_file(path: impl Into<PathBuf>) -> Self
pub fn read_only(self, flag: bool) -> Self
pub fn create_if_missing(self, flag: bool) -> Self
pub fn apply_default_pragmas(self, flag: bool) -> Self
pub fn add_pragma( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn busy_timeout(self, timeout: Option<Duration>) -> Self
Trait Implementations§
Source§impl Clone for DatabaseOptions
impl Clone for DatabaseOptions
Source§fn clone(&self) -> DatabaseOptions
fn clone(&self) -> DatabaseOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatabaseOptions
impl Debug for DatabaseOptions
Auto Trait Implementations§
impl Freeze for DatabaseOptions
impl RefUnwindSafe for DatabaseOptions
impl Send for DatabaseOptions
impl Sync for DatabaseOptions
impl Unpin for DatabaseOptions
impl UnwindSafe for DatabaseOptions
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