pub enum PickleDbDumpPolicy {
    NeverDump,
    AutoDump,
    DumpUponRequest,
    PeriodicDump(Duration),
}
Expand description

An enum that determines the policy of dumping PickleDb changes into the file

Variants

NeverDump

Never dump any change, file will always remain read-only

AutoDump

Every change will be dumped immediately and automatically to the file

DumpUponRequest

Data won’t be dumped unless the user calls PickleDb::dump() proactively to dump the data

PeriodicDump(Duration)

Changes will be dumped to the file periodically, no sooner than the Duration provided by the user. The way this mechanism works is as follows: each time there is a DB change the last DB dump time is checked. If the time that has passed since the last dump is higher than Duration, changes will be dumped, otherwise changes will not be dumped

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.