pub struct ReviewState {
pub reviewed_hunks: BTreeSet<String>,
pub cursor: Option<(String, usize)>,
pub split_diff: Option<bool>,
pub wrap: Option<bool>,
pub file_view: bool,
}Fields§
§reviewed_hunks: BTreeSet<String>Hunk digests marked reviewed.
One key per hunk, not one per class. A class key made every mark in a class hostage to every other hunk in it: change one hunk of five and the four nobody touched went unread again.
A state file written before this field existed records
reviewed_classes, which no longer loads — those keys are class
hashes and cannot be read as hunk digests. The rest of the file
(cursor, layout) is unaffected.
cursor: Option<(String, usize)>Resume position: (group id or file path, row offset) in the last-open plan — a group id in the semantic view, a file path in the file view.
split_diff: Option<bool>The reader’s diff-layout choice, or None if they have not made one.
None means “use the configured default” — which is why this is an
option and not a bool. A state file written before this field existed
records false, and that deserialises to Some(false): a review
already on disk keeps the layout it had, whatever the config now says.
wrap: Option<bool>The reader’s soft-wrap choice, or None if they have not pressed w.
An option for the same reason split_diff is one: absent means the
reader has never chosen, and the renderer’s own default stands.
file_view: boolFlattened per-file view instead of semantic groups (default: groups).
Trait Implementations§
Source§impl Clone for ReviewState
impl Clone for ReviewState
Source§fn clone(&self) -> ReviewState
fn clone(&self) -> ReviewState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more