pub struct PlanDocument {
pub schema_version: u32,
pub generator: Generator,
pub source: Source,
pub stats: Stats,
pub files: Vec<FileEntry>,
pub hunks: Vec<HunkEntry>,
pub classes: Vec<ClassEntry>,
pub groups: Option<Vec<Group>>,
pub reading_plan: Option<Vec<ReadingStep>>,
pub audit: Audit,
pub symbols: Option<SymbolIndex>,
}Expand description
The one JSON document: a grouped, ordered reading plan for a diff.
Fields§
§schema_version: u32§generator: Generator§source: Source§stats: Stats§files: Vec<FileEntry>§hunks: Vec<HunkEntry>§classes: Vec<ClassEntry>§groups: Option<Vec<Group>>None until the grouping stage runs. Some(vec![]) is a bug, not a state.
reading_plan: Option<Vec<ReadingStep>>None until the grouping stage runs; ordered foundation-first once present.
audit: Audit§symbols: Option<SymbolIndex>Symbol-level dependency sites: which token resolves to which
declaration. Produced by classify, beside the class graph.
None on a document written before this field existed. It is additive,
so schema_version stays 3 — but a stored artefact does get re-read
(dfr agent --doc, the grouping cache), which is why this defaults
rather than requiring the key.
Implementations§
Source§impl PlanDocument
impl PlanDocument
Sourcepub fn from_json(s: &str) -> Result<Self, SchemaError>
pub fn from_json(s: &str) -> Result<Self, SchemaError>
Parse and enforce the version gate. Use this instead of raw serde_json.
pub fn to_json_pretty(&self) -> Result<String, SchemaError>
pub fn to_json(&self) -> Result<String, SchemaError>
Trait Implementations§
Source§impl Clone for PlanDocument
impl Clone for PlanDocument
Source§impl Debug for PlanDocument
impl Debug for PlanDocument
Source§impl<'de> Deserialize<'de> for PlanDocument
impl<'de> Deserialize<'de> for PlanDocument
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PlanDocument
impl PartialEq for PlanDocument
Source§impl Serialize for PlanDocument
impl Serialize for PlanDocument
impl StructuralPartialEq for PlanDocument
Auto Trait Implementations§
impl Freeze for PlanDocument
impl RefUnwindSafe for PlanDocument
impl Send for PlanDocument
impl Sync for PlanDocument
impl Unpin for PlanDocument
impl UnsafeUnpin for PlanDocument
impl UnwindSafe for PlanDocument
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more