pub struct Config { /* private fields */ }
Expand description
Persy configuration structure.
Lock are taken in order, should never go in deadlock so the default timeout is huge. Current default values:
cache_size = 32M
cache_age_limit = 1 Day
transaction_lock_timeout = 1 Day
concurrent_modification_strategy = LastWin
Implementations
sourceimpl Config
impl Config
pub fn new() -> Config
pub fn cache_size(&self) -> u64
pub fn cache_age_limit(&self) -> Duration
pub fn transaction_lock_timeout(&self) -> &Duration
pub fn change_cache_size(&mut self, cache_size: u64)
pub fn change_cache_age_limit(&mut self, cache_age_limit: Duration)
pub fn change_transaction_lock_timeout(
&mut self,
transaction_lock_timeout: Duration
)
pub fn tx_strategy(&self) -> &TxStrategy
pub fn change_tx_strategy(&mut self, strategy: TxStrategy)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more