pub enum Error {
Show 31 variants
RepositoryNotFound {
start: PathBuf,
},
LegacyLayout {
root: PathBuf,
},
InvalidManifest {
path: PathBuf,
reason: String,
},
UnsupportedSchema {
path: PathBuf,
found: String,
supported: String,
},
InvalidSources {
path: PathBuf,
reason: String,
},
InvalidScope {
path: PathBuf,
reason: String,
},
UnknownKeys {
path: PathBuf,
keys: Vec<String>,
},
KindSchema {
reason: String,
},
ShareNotFound {
tried: Vec<PathBuf>,
},
StrictDiagnostics {
count: usize,
},
Git {
reason: String,
},
Io {
path: PathBuf,
source: Error,
},
Transport(Error),
Refused {
code: u8,
reason: String,
},
Protocol {
reason: String,
},
Registry {
errors: Vec<RegistryError>,
},
Http {
reason: String,
},
Lease {
reason: String,
},
DeploymentNotFound {
id: String,
},
InvalidDeployment {
reason: String,
},
CapabilityNotFound {
id: String,
},
NotFound {
reason: String,
},
InvalidPolicy {
path: PathBuf,
reason: String,
},
InvalidProjection {
target: String,
reason: String,
},
InvalidSurface {
surface: String,
reason: String,
},
InvalidDistribution {
path: String,
reason: String,
},
InvalidRelease {
path: String,
reason: String,
},
InvalidDesign {
path: String,
reason: String,
},
InvalidSource {
path: String,
reason: String,
},
UnresolvedRelation {
findings: Vec<String>,
},
Stale {
files: Vec<String>,
},
}Expand description
Everything that stops a command.
Variants§
RepositoryNotFound
No ancestor of the start directory carries .ai/manifest.yaml.
LegacyLayout
Project data sits under .majordomus/ with no manifest: the pre-.ai layout.
InvalidManifest
The manifest does not parse, or a constraint of its schema fails.
UnsupportedSchema
The manifest declares a layer schema this executable does not read.
Fields
InvalidSources
sources.yaml does not parse or contradicts its own rules.
InvalidScope
scope.yaml does not parse or contradicts its own rules.
UnknownKeys
A file carries keys nothing reads.
KindSchema
A kinds file or a schema file cannot be used: malformed, contradictory, or redefining a distributed one.
No directory tried holds kinds.yaml.
StrictDiagnostics
--strict was given and the index carries error diagnostics.
Git
git could not be run or answered with an error, where it was needed.
Io
A file or directory could not be read or written.
Transport(Error)
The stdio transport failed to read or write.
Refused
A subsystem refused an operation and carries its own message and exit code. The message is the subsystem’s, complete, and is printed as it is: rephrasing an actionable refusal into a generic one is how a person loses the corrective command.
Fields
Protocol
A protocol frame could not be encoded, or an internal answer could not be produced.
Registry
The capability registry does not build; every violation is listed.
Fields
errors: Vec<RegistryError>The violations, in id order.
Http
The HTTP projection failed: a port that cannot be bound, or an OpenAPI document that cannot be built.
Lease
The shared server’s lease could not be acquired or joined.
DeploymentNotFound
A deployment was named that the layer does not declare.
InvalidDeployment
A deployment object exists and cannot be read as one.
CapabilityNotFound
No capability has this id.
NotFound
A caller named something this repository does not hold. Not the caller’s fault in the sense an internal error is: the request was well formed and the thing is absent, which is the missing-artifact code and not the internal one.
InvalidPolicy
The policy file does not parse, or does not carry what the projections need.
InvalidProjection
A declared provider projection cannot be produced.
InvalidSurface
A web surface’s declaration cannot be read, or the topology it would join is not valid.
Fields
InvalidDistribution
The distribution model cannot be read, or it breaks an invariant of its own contract.
Fields
InvalidRelease
A release record cannot be read, or it disagrees with the distribution model.
Fields
InvalidDesign
The design declaration, or a projection rendered from it, is inconsistent: a role naming no palette entry, a state word filed under two meanings, a value the CSS parser would drop in silence. Nothing is written.
Fields
InvalidSource
A Rust source file of the crate under inspection cannot be read or parsed, so the quality inventory would be built over less than the whole crate. Reported rather than skipped: a partial inventory that looked clean would be the one result this subsystem must never produce.
Fields
UnresolvedRelation
The layer names something this repository does not hold, so the graph composed from it would carry a reference to nothing. Nothing is written: a published graph whose reference resolves to no node is a naming defect a reader cannot see, and every regeneration would reproduce it.
Fields
Stale
generate --check found committed projections that differ from the registry, or are missing.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()