Struct dochy::fs::history::HistoryOptions [−][src]
pub struct HistoryOptions { /* fields omitted */ }
Expand description
Customize how we build history files.
If you need the default value, you can get it with new()
use dochy_fs::history::HistoryOptions;
let op = HistoryOptions::new();
If you want to customize, you can use builders.
use dochy_fs::FsResult;
use dochy_fs::history::{HistoryOptions, HistoryOptionsBuilder, CumulativeOptionsBuilder};
fn main() -> FsResult<()>{
let op = HistoryOptionsBuilder::new()
.max_phase(5)
.cumulative(Some(CumulativeOptionsBuilder::new()
.limit_nth(Some(2))
.limit_count(Some(100))))
.build()?;
Ok(())
}
You need to use the same options for a history_hash_dir. Changing the options causes an undefined behavior.
When you modify the source Dochy file, a new history_hash_dir will be created, so you can change the options at the very time.
You can use () for AsRef
Implementations
if false, Phase-0 isn’t made twice
If this is Some, the max phase will be cumulative
self.cumulative().is_some()
Construct HistoryOption with default values
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for HistoryOptions
impl Send for HistoryOptions
impl Sync for HistoryOptions
impl Unpin for HistoryOptions
impl UnwindSafe for HistoryOptions
Blanket Implementations
Mutably borrows from an owned value. Read more