pub enum GraphBuildError {
Show 23 variants
RootTargetMismatch,
SnapshotFingerprintMismatch,
MissingUnitBinding {
unit: u32,
},
DanglingUnitBinding {
unit: u32,
},
SharedUnitBinding {
held: u32,
unit: u32,
},
RepeatedUnitContainer {
unit: u32,
container: u32,
},
MissingUnitDeclaration {
unit: u32,
},
RepeatedUnitDeclaration {
unit: u32,
},
SharedUnitRoot {
root: u32,
},
MissingDependencyUnit {
edge: u32,
alias: Box<str>,
},
MissingSourceNode {
unit: u32,
path: Box<str>,
},
RepeatedUnitSource {
unit: u32,
path: Box<str>,
},
ReferenceRecordMismatch {
references: u32,
records: u32,
},
MissingDefinitionNode {
definition: u32,
},
UnnamedDefinitionKind {
definition: u32,
},
UnnamedReferenceKind {
reference: u32,
},
MissingReferenceRecord {
reference: u32,
},
UnknownContainmentNode {
node: u32,
},
MultiplyContained {
parent: u32,
child: u32,
},
UnparentedNode {
node: u32,
},
RootHasParent {
root: u32,
parent: u32,
},
ContainmentCycle {
node: u32,
},
CapacityExceeded {
collection: GraphCollection,
limit: u32,
},
}Expand description
A refusal taken while projecting one resolution into a graph.
Variants§
RootTargetMismatch
The supplied snapshot and resolution were requested for other targets.
SnapshotFingerprintMismatch
The supplied snapshot is not the one the resolution was validated against, even though both name the same root target.
MissingUnitBinding
A report unit has no graph container, or no source scope beneath one.
DanglingUnitBinding
A report unit is bound to a build unit the supplied snapshot does not hold, which is a binding that names nothing rather than a missing one.
Two report units are bound to one build unit, so one unit-qualified source would have two owners.
RepeatedUnitContainer
One planned unit was given two container nodes, so everything it holds would be rooted at whichever was bound last.
Fields
MissingUnitDeclaration
A report unit states no declaration this projection can root it at.
A unit whose container is named by its own sources — a Go package clause, and not a manifest — has no node at all when the report states no such declaration for it.
RepeatedUnitDeclaration
A report unit states more than one declaration of its own container.
Two planned units name one node as the root of their own trees.
MissingDependencyUnit
A snapshot dependency edge names a build unit with no graph container.
Fields
MissingSourceNode
A stated site names a source the bound unit does not instantiate.
Fields
RepeatedUnitSource
One report unit instantiates one normalized path twice, so a second file node would be minted for a source that already holds one.
Fields
ReferenceRecordMismatch
The report states a different number of references and resolution records, so no pairing between them is stated at all.
Fields
MissingDefinitionNode
A stated join names a definition this graph holds no node for.
UnnamedDefinitionKind
A report definition states a kind the adapter reading it has no node for.
The shared report vocabulary carries every language’s kinds. Each language’s resolution is validated against its own subset before it is published, so this refusal answers a report that reached the projection without that validation rather than a repository that declares something new.
UnnamedReferenceKind
A report reference states a kind the adapter reading it has no record for.
MissingReferenceRecord
An edge was produced for a reference record this graph does not hold.
UnknownContainmentNode
A containment edge names a node this graph holds no record for.
MultiplyContained
One node is contained by more than one parent.
UnparentedNode
One node below the unit roots is contained by nothing.
RootHasParent
One unit root is contained by another node.
ContainmentCycle
One containment chain returns to a node it already visited.
CapacityExceeded
One collection reached its configured ceiling.
Fields
collection: GraphCollectionWhich collection refused the insertion.
Trait Implementations§
Source§impl Debug for GraphBuildError
impl Debug for GraphBuildError
Source§impl Display for GraphBuildError
impl Display for GraphBuildError
Source§impl Error for GraphBuildError
impl Error for GraphBuildError
1.30.0 · 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()