pub struct Prepared {
pub classification: Classification,
pub manifest: Option<PreparedManifest>,
pub definitions: Vec<PreparedDefinition>,
pub payload: Vec<PayloadEntry>,
pub diagnostics: BTreeMap<String, Vec<SchemaDiagnostic>>,
pub changes: BTreeMap<String, Vec<SchemaDiagnostic>>,
}Fields§
§classification: Classification§manifest: Option<PreparedManifest>§definitions: Vec<PreparedDefinition>§payload: Vec<PayloadEntry>§diagnostics: BTreeMap<String, Vec<SchemaDiagnostic>>Package-level findings by source path: what discovery and translation met and could not
convert. A definition’s own reading diagnostics live on its reading only; see
Prepared::all_diagnostics.
changes: BTreeMap<String, Vec<SchemaDiagnostic>>What preparing changed in each file, by source path: the keys a pre-v1 upgrade or a
foreign translation dropped, moved or repaired. A caller that only reads the package
reports Prepared::changed_files; mars migrate lists these.
Implementations§
Source§impl Prepared
impl Prepared
Sourcepub fn lost_restrictions(
&self,
) -> impl Iterator<Item = (&str, &SchemaDiagnostic)>
pub fn lost_restrictions( &self, ) -> impl Iterator<Item = (&str, &SchemaDiagnostic)>
The changes that lost a restriction (a deny or ask tool entry, permission,
sandbox, approval), by source path. Unlike the rest of changes, a caller reports
these on every run: each leaves an agent less restricted than its file says.
Sourcepub fn changed_files(&self) -> usize
pub fn changed_files(&self) -> usize
How many authored files preparation changed: the prepared bytes differ from the file, and
for a pre-v1 package mars migrate writes them back. A generated mars.toml has no file
to change and is not counted.
Sourcepub fn all_diagnostics(&self) -> BTreeMap<&str, Vec<&SchemaDiagnostic>>
pub fn all_diagnostics(&self) -> BTreeMap<&str, Vec<&SchemaDiagnostic>>
Every diagnostic by source path: package-level first, then the file’s reading.