Module dochy_fs::history [−][src]
Structs
Customize how “cumulative diff files” are built
Construct CumulativeOption with error check
Represents every file history in every hash directory of a project
Represents every history file in a hash directory
Metadata history files’ filename contains. The filename can be precisely restored from it.
Data of a history file.
Customize how we build history files.
Construct HistoryOption with error check
Determines if files are safe to be removed
info gettable without accessing mutex
Functions
History’s filenames have a tag(arbitrary string given by user
You can peek the file to be derived in the next save, but the Mutex is needed for save and load. If you call save or load while the MutexGuard is alive, deadlock occurs.
The backdoor to change DochySrc while running. References of PeekableCacheInfo for the history_dir will corrupt If save / load in the history_dir is running, calling this results undefined behavior
Loads a history file.
calculates the diff from the latest save file(most of the time) and save the diff file.
calculates the diff from the latest save file(most of the time) and save the diff file. This is non-blocking. RootObject is cloned and saved. RootObject consists of some Arcs so the cloning costs nearly zero. This system employs Copy on Write strategy. Actual copy occurs when the memory managed by Arc is modified before the saving is finished using Arc::make_mut.
Saves when no save-thread is runnning for the history_dir. Calling this function concurrently for the same history_dir can make the evaluation incorrect.
During save and load, the RootObject’s ID and the selected file is recorded. If you use the same RootObject in the next save, the file to be derived is automatically selected by the system.