Skip to main content

GraphBuildError

Enum GraphBuildError 

Source
pub enum GraphBuildError {
Show 17 variants RootTargetMismatch, SnapshotFingerprintMismatch, MissingUnitBinding { unit: u32, }, DanglingUnitBinding { unit: u32, }, SharedUnitBinding { held: u32, unit: 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, }, 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.

Fields

§unit: u32

The report-local unit identifier that no binding answers for.

§

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.

Fields

§unit: u32

The report-local unit identifier whose binding names nothing.

§

SharedUnitBinding

Two report units are bound to one build unit, so one unit-qualified source would have two owners.

Fields

§held: u32

The report-local unit identifier that bound the build unit first.

§unit: u32

The report-local unit identifier that bound it again.

§

MissingDependencyUnit

A snapshot dependency edge names a build unit with no graph container.

Fields

§edge: u32

The edge’s position among the snapshot’s dependency edges.

§alias: Box<str>

The namespace-local name that edge declares its target under.

§

MissingSourceNode

A stated site names a source the bound unit does not instantiate.

Fields

§unit: u32

The report-local unit identifier the site belongs to.

§path: Box<str>

The normalized repository-relative path the site named.

§

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

§unit: u32

The report-local unit identifier that instantiates it twice.

§path: Box<str>

The normalized repository-relative path stated more than once.

§

ReferenceRecordMismatch

The report states a different number of references and resolution records, so no pairing between them is stated at all.

Fields

§references: u32

How many references the report states.

§records: u32

How many resolution records the report states.

§

MissingDefinitionNode

A stated join names a definition this graph holds no node for.

Fields

§definition: u32

The report-local definition identifier that named nothing.

§

MissingReferenceRecord

An edge was produced for a reference record this graph does not hold.

Fields

§reference: u32

The reference identity that answers for no record.

§

UnknownContainmentNode

A containment edge names a node this graph holds no record for.

Fields

§node: u32

The node identity the containment relation named.

§

MultiplyContained

One node is contained by more than one parent.

Fields

§parent: u32

One parent the child is contained by.

§child: u32

The multiply-contained child.

§

UnparentedNode

One node below the unit roots is contained by nothing.

Fields

§node: u32

The node no containment edge claims.

§

RootHasParent

One unit root is contained by another node.

Fields

§root: u32

The unit root that must own itself.

§parent: u32

The node that claims it.

§

ContainmentCycle

One containment chain returns to a node it already visited.

Fields

§node: u32

The node the chain returned to.

§

CapacityExceeded

One collection reached its configured ceiling.

Fields

§collection: GraphCollection

Which collection refused the insertion.

§limit: u32

The ceiling that collection is bounded by.

Trait Implementations§

Source§

impl Debug for GraphBuildError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GraphBuildError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for GraphBuildError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.