Skip to main content

Module state

Module state 

Source
Expand description

State management: tracks run history with unique IDs, stores backup nodes for revert, and manages the .hack/rs state directory.

Structs§

FileModification
File modification metadata
RunMetadata
Metadata about a single run
RunsIndex
Index of all runs

Enums§

RunStatus
Status of a run

Functions§

clean_old_state
Clean old state data
generate_run_id
Generates a short unique run ID (7 characters, like git)
get_state_dir
Get the state directory path
get_state_size
Get total size of state directory
hash_file
Compute blake3 hash of a file
load_run_metadata
Load run metadata
restore_from_nodes
Restore nodes from backup
revert_run
Revert a run
save_backup_nodes
Save backup nodes to JSON files
save_run_metadata
Save run metadata
show_history
Display run history