Skip to main content

DescriptorCacheError

Enum DescriptorCacheError 

Source
pub enum DescriptorCacheError {
Show 69 variants RelativeCacheDirectory(PathBuf), RelativeManagedDirectory { kind: &'static str, path: PathBuf, }, NormalizeManagedDirectory { path: PathBuf, source: Error, }, OverlappingManagedDirectories { first_kind: &'static str, first: PathBuf, second_kind: &'static str, second: PathBuf, }, UnsafeManagedDirectory { kind: &'static str, managed: PathBuf, working: PathBuf, }, TargetOutsideSourceExclusion { target: PathBuf, exclusion: PathBuf, }, UnsafeSourceExclusion { exclusion: PathBuf, working: PathBuf, }, GeneratedStateOutsideSourceExclusion { kind: &'static str, path: PathBuf, exclusion: PathBuf, }, CreateCacheDirectory { path: PathBuf, source: Error, }, UnsafeCacheEntry(PathBuf), OpenCacheLock { path: PathBuf, source: Error, }, AcquireCacheLock { path: PathBuf, source: Error, }, InvalidDirtyMarker(PathBuf), DirtyTargetMismatch { expected: PathBuf, actual: PathBuf, }, DirtyStagingMismatch { expected: PathBuf, actual: PathBuf, }, RecoveryDidNotFullyRebuild, UnownedRecoveryTarget(PathBuf), UnownedRecoveryStaging(PathBuf), ReadDescriptorTargetMarker { path: PathBuf, source: Error, }, ReadDescriptorStagingMarker { path: PathBuf, source: Error, }, UnsafeRecoveryDirectory { kind: &'static str, path: PathBuf, }, RemoveRecoveryDirectory { kind: &'static str, path: PathBuf, source: Error, }, DescriptorCargo(DescriptorCargoRunError), HashCurrentInput { path: PathBuf, source: Error, }, ConflictingSidecarArtifactEvidence { path: PathBuf, first: String, second: String, unit: DescriptorCargoUnitId, extern_name: String, }, NonUtf8CargoPath(PathBuf), DuplicateArtifactCoordinate(String), ArtifactMissingFromCurrentEvidence, AmbiguousCurrentArtifactEvidence, MultipleFreshUnitsForArtifact { coordinate: String, first: DescriptorCargoUnitId, second: DescriptorCargoUnitId, }, MissingArtifactSetSnapshot { coordinate: String, }, MissingArtifactIndex { coordinate: String, }, RebuiltArtifactMissingFreshUnit { coordinate: String, }, InterruptedUnitMissingArtifact(DescriptorCargoUnitId), ConflictingInterruptedUnitCandidates(DescriptorCargoUnitId), ParseCacheFile { path: PathBuf, source: Error, }, ReadCacheFile { path: PathBuf, source: Error, }, UnsupportedCacheSchema { path: PathBuf, actual: u16, expected: u16, }, CachedSidecarSchemaMismatch { path: PathBuf, actual: u16, expected: u16, }, CachedSidecarUnitMismatch { unit: DescriptorCargoUnitId, actual: String, }, CachedSidecarObjectPathMismatch { unit: DescriptorCargoUnitId, actual: String, expected: String, }, CacheCoordinateMismatch { path: PathBuf, expected: String, actual: String, }, SnapshotArtifactSetMismatch(PathBuf), InvalidCachedUnitId { path: PathBuf, source: WrapperError, }, InvalidCachedGenerationHash { path: PathBuf, field: &'static str, value: String, reason: String, }, DuplicateCachedUnit { path: PathBuf, unit: DescriptorCargoUnitId, }, CachedUnitClaimedByMultipleArtifacts { unit: DescriptorCargoUnitId, first: String, second: String, }, MissingCachedUnitFile { unit: DescriptorCargoUnitId, kind: CacheUnitFileKind, path: PathBuf, }, MissingMergedUnit(DescriptorCargoUnitId), ConflictingPrevalidatedObjectHash { unit: DescriptorCargoUnitId, first: String, second: String, }, ConflictingCachedGeneration { unit: DescriptorCargoUnitId, first: String, second: String, }, MissingCachedGeneration(DescriptorCargoUnitId), CachedGenerationObjectHashMismatch { unit: DescriptorCargoUnitId, pointer: String, sidecar: String, }, CachedSidecarHashMismatch { unit: DescriptorCargoUnitId, expected: String, actual: String, }, InvalidCachedSidecar { unit: DescriptorCargoUnitId, path: PathBuf, reason: String, }, CachedOutDirDependencyMismatch { unit: DescriptorCargoUnitId, source: WrapperError, }, CachedDependencyNotEnumerated { unit: DescriptorCargoUnitId, extern_name: String, path: PathBuf, }, AmbiguousCachedDependencyArtifact { unit: DescriptorCargoUnitId, extern_name: String, path: PathBuf, matches: usize, }, StaleCachedDependency { unit: DescriptorCargoUnitId, extern_name: String, path: PathBuf, expected: String, actual: String, }, CachedArtifactJoinMismatch { unit: DescriptorCargoUnitId, expected: String, actual: String, }, MergedSidecars(DescriptorSidecarError), ArtifactJoin(UnitArtifactJoinError), SerializeCacheRecord(Error), DescriptorObjectHashMismatch { unit: DescriptorCargoUnitId, expected: String, actual: String, }, CachePathWithoutParent(PathBuf), InvalidCacheFilename(PathBuf), ReadCacheSource { path: PathBuf, source: Error, }, WriteCacheFile { path: PathBuf, source: Error, }, ConflictingCacheEntry(PathBuf),
}
Expand description

Fail-closed descriptor-cache error.

Variants§

§

RelativeCacheDirectory(PathBuf)

Cache identity must not depend on the caller’s current directory.

§

RelativeManagedDirectory

Every managed directory must use an absolute deletion-safe identity.

Fields

§kind: &'static str

Directory role.

§path: PathBuf

Rejected path.

§

NormalizeManagedDirectory

Symlinks and lexical aliases are resolved before overlap checks.

Fields

§path: PathBuf

Caller path.

§source: Error

Canonicalization failure.

§

OverlappingManagedDirectories

Cache, staging, and descriptor target are exact disjoint roots.

Fields

§first_kind: &'static str

First role.

§first: PathBuf

First normalized path.

§second_kind: &'static str

Second role.

§second: PathBuf

Second normalized path.

§

UnsafeManagedDirectory

Recovery roots may never contain the Cargo working directory.

Fields

§kind: &'static str

Managed role.

§managed: PathBuf

Candidate deletion root.

§working: PathBuf

Cargo working directory.

§

TargetOutsideSourceExclusion

The exact descriptor target must be within the phase-invariant generated root.

Fields

§target: PathBuf

Exact target.

§exclusion: PathBuf

Exact generated root.

§

UnsafeSourceExclusion

Excluding an ancestor of the package would erase actual source inputs.

Fields

§exclusion: PathBuf

Exact generated root.

§working: PathBuf

Cargo working directory.

§

GeneratedStateOutsideSourceExclusion

In-package cache state must live beneath the one exact excluded subtree.

Fields

§kind: &'static str

Managed role.

§path: PathBuf

Managed path.

§exclusion: PathBuf

Exact excluded subtree.

§

CreateCacheDirectory

Persistent cache layout could not be created.

Fields

§path: PathBuf

Directory.

§source: Error

I/O failure.

§

UnsafeCacheEntry(PathBuf)

Cache and lock namespaces must not be redirected by symlinks/special files.

§

OpenCacheLock

Per-cache generation lock could not be opened.

Fields

§path: PathBuf

Exact lock path.

§source: Error

I/O failure.

§

AcquireCacheLock

Another process owns this cache generation until the OS lock releases.

Fields

§path: PathBuf

Exact lock path.

§source: Error

I/O failure.

§

InvalidDirtyMarker(PathBuf)

The crash marker itself may not be redirected through a symlink.

§

DirtyTargetMismatch

A dirty cache cannot authorize deletion of another target namespace.

Fields

§expected: PathBuf

Current request target.

§actual: PathBuf

Interrupted target.

§

DirtyStagingMismatch

Rebinding a normalized journal path to the request’s lexical source exclusion must preserve its exact filesystem identity.

Fields

§expected: PathBuf

Journaled canonical staging identity.

§actual: PathBuf

Request-spelled staging identity.

§

RecoveryDidNotFullyRebuild

Recovery requires a Cargo run in the freshly recreated target.

§

UnownedRecoveryTarget(PathBuf)

Recovery deletion is allowed only for a marker-proven target.

§

UnownedRecoveryStaging(PathBuf)

Staging deletion requires its own runner-written marker.

§

ReadDescriptorTargetMarker

Target marker inspection failed.

Fields

§path: PathBuf

Exact target.

§source: Error

I/O failure.

§

ReadDescriptorStagingMarker

Staging ownership marker inspection failed.

Fields

§path: PathBuf

Exact staging root.

§source: Error

I/O failure.

§

UnsafeRecoveryDirectory

A recovery path was replaced with a file or symlink.

Fields

§kind: &'static str

Managed role.

§path: PathBuf

Exact path.

§

RemoveRecoveryDirectory

Exact request-owned recovery state could not be removed.

Fields

§kind: &'static str

Managed role.

§path: PathBuf

Exact path.

§source: Error

I/O failure.

§

DescriptorCargo(DescriptorCargoRunError)

Descriptor Cargo run failed.

§

HashCurrentInput

A current Cargo-enumerated input could not be hashed.

Fields

§path: PathBuf

Exact current path.

§source: Error

I/O failure.

§

ConflictingSidecarArtifactEvidence

Two descriptor rustc invocations observed different bytes at one exact Cargo artifact path.

Fields

§path: PathBuf

Exact host-local Cargo path.

§first: String

First wrapper-time descriptor-domain hash.

§second: String

Conflicting wrapper-time descriptor-domain hash.

§unit: DescriptorCargoUnitId

Unit contributing the conflict.

§extern_name: String

Extern contributing the conflict.

§

NonUtf8CargoPath(PathBuf)

Cargo paths originate in JSON and must remain exact UTF-8 strings.

§

DuplicateArtifactCoordinate(String)

Two current artifacts collapsed to one deterministic Cargo coordinate.

§

ArtifactMissingFromCurrentEvidence

A joined artifact unexpectedly disappeared from current evidence.

§

AmbiguousCurrentArtifactEvidence

Current Cargo messages contained indistinguishable artifacts.

§

MultipleFreshUnitsForArtifact

Multiple fresh units cannot own one Cargo artifact.

Fields

§coordinate: String

Current artifact coordinate.

§first: DescriptorCargoUnitId

First fresh unit.

§second: DescriptorCargoUnitId

Second fresh unit.

§

MissingArtifactSetSnapshot

No-op recovery requires the exact prior complete artifact-set snapshot.

Fields

§coordinate: String

Exact current artifact-set coordinate.

§

MissingArtifactIndex

A fresh Cargo artifact has no explicit positive or negative cache index.

Fields

§coordinate: String

Exact current artifact coordinate.

§

RebuiltArtifactMissingFreshUnit

A rebuilt artifact emitted no fresh wrapper unit.

Fields

§coordinate: String

Exact artifact coordinate.

§

InterruptedUnitMissingArtifact(DescriptorCargoUnitId)

Interrupted staging is authoritative only when its unit joins an exact artifact from the recovery Cargo invocation.

§

ConflictingInterruptedUnitCandidates(DescriptorCargoUnitId)

Two recovery attempts claimed the same unit with different validated sidecar content, so neither is preferred implicitly.

§

ParseCacheFile

Corrupt cache JSON.

Fields

§path: PathBuf

Cache record.

§source: Error

JSON failure.

§

ReadCacheFile

Cache file read failed.

Fields

§path: PathBuf

Cache record.

§source: Error

I/O failure.

§

UnsupportedCacheSchema

Cache schema mismatch.

Fields

§path: PathBuf

Cache record.

§actual: u16

Actual schema.

§expected: u16

Required schema.

§

CachedSidecarSchemaMismatch

A cached wrapper sidecar uses another wrapper schema.

Fields

§path: PathBuf

Cached sidecar.

§actual: u16

Actual schema.

§expected: u16

Required schema.

§

CachedSidecarUnitMismatch

Cache filename/unit selection and sidecar identity diverged.

Fields

§unit: DescriptorCargoUnitId

Cache-selected unit.

§actual: String

Sidecar unit text.

§

CachedSidecarObjectPathMismatch

A cached sidecar points outside its exact content-addressed object slot.

Fields

§unit: DescriptorCargoUnitId

Cache-selected unit.

§actual: String

Sidecar path.

§expected: String

Required path.

§

CacheCoordinateMismatch

Coordinate-addressed filename and record diverged.

Fields

§path: PathBuf

Cache record.

§expected: String

Filename-derived identity.

§actual: String

Payload identity.

§

SnapshotArtifactSetMismatch(PathBuf)

Exact snapshot lists another artifact set.

§

InvalidCachedUnitId

Unit ID text in cache is malformed.

Fields

§path: PathBuf

Cache record.

§source: WrapperError

ID parser.

§

InvalidCachedGenerationHash

Generation pointers contain only exact lowercase content hashes.

Fields

§path: PathBuf

Pointer record.

§field: &'static str

Hash field.

§value: String

Rejected value.

§reason: String

Validation detail.

§

DuplicateCachedUnit

Cache record repeats a unit.

Fields

§path: PathBuf

Cache record.

§unit: DescriptorCargoUnitId

Duplicate.

§

CachedUnitClaimedByMultipleArtifacts

One unit cannot be authorized by two current artifacts.

Fields

§first: String

First artifact.

§second: String

Second artifact.

§

MissingCachedUnitFile

Explicitly indexed cache bytes are gone.

Fields

§kind: CacheUnitFileKind

File role.

§path: PathBuf

Exact cache path.

§

MissingMergedUnit(DescriptorCargoUnitId)

Fresh and cached staging did not contain an authorized unit.

§

ConflictingPrevalidatedObjectHash

One materialized unit cannot have two verified object hashes.

Fields

§unit: DescriptorCargoUnitId

Materialized unit.

§first: String

First verified hash.

§second: String

Conflicting verified hash.

§

ConflictingCachedGeneration

One logical Cargo unit cannot select two cache generations at once.

Fields

§unit: DescriptorCargoUnitId

Logical unit.

§first: String

First exact generation.

§second: String

Second exact generation.

§

MissingCachedGeneration(DescriptorCargoUnitId)

Every merged sidecar must have a committed immutable generation.

§

CachedGenerationObjectHashMismatch

Pointer and sidecar must agree on the immutable object blob.

Fields

§unit: DescriptorCargoUnitId

Logical unit.

§pointer: String

Pointer hash.

§sidecar: String

Sidecar hash.

§

CachedSidecarHashMismatch

Immutable sidecar bytes must match their generation address.

Fields

§unit: DescriptorCargoUnitId

Logical unit.

§expected: String

Generation address.

§actual: String

Actual exact bytes.

§

InvalidCachedSidecar

A content-addressed sidecar failed the wrapper protocol’s semantic validation before its cache object was admitted to the linker.

Fields

§unit: DescriptorCargoUnitId

Logical unit.

§path: PathBuf

Exact immutable sidecar path.

§reason: String

Value-redacted validation detail.

§

CachedOutDirDependencyMismatch

A cached unit’s rustc-declared generated-source inputs changed or are no longer safe beneath the persistent descriptor target.

Fields

§unit: DescriptorCargoUnitId

Cached unit.

§source: WrapperError

Exact generated-input validation failure.

§

CachedDependencyNotEnumerated

Cached unit points at a dependency absent from current Cargo artifacts.

Fields

§unit: DescriptorCargoUnitId

Cached unit.

§extern_name: String

Extern.

§path: PathBuf

Exact wrapper-time path.

§

AmbiguousCachedDependencyArtifact

One exact dependency path must belong to one Cargo artifact message.

Fields

§unit: DescriptorCargoUnitId

Cached unit.

§extern_name: String

Extern.

§path: PathBuf

Exact wrapper-time path.

§matches: usize

Matching Cargo messages.

§

StaleCachedDependency

Cached dependency bytes changed after the wrapper observed them.

Fields

§extern_name: String

Extern.

§path: PathBuf

Exact wrapper-time path.

§expected: String

Wrapper-time exact input hash.

§actual: String

Current exact input hash.

§

CachedArtifactJoinMismatch

Artifact-specific index did not join back to that exact current artifact.

Fields

§expected: String

Index expectation.

§actual: String

Actual current join.

§

MergedSidecars(DescriptorSidecarError)

Merged sidecars/objects failed existing strict validation.

§

ArtifactJoin(UnitArtifactJoinError)

Sidecar/Cargo join failed.

§

SerializeCacheRecord(Error)

Cache record serialization failed.

§

DescriptorObjectHashMismatch

Cached object’s exact bytes disagree with its sidecar.

Fields

§expected: String

Sidecar.

§actual: String

Current bytes.

§

CachePathWithoutParent(PathBuf)

Cache path has no parent.

§

InvalidCacheFilename(PathBuf)

Cache filename cannot support an atomic temporary sibling.

§

ReadCacheSource

Source bytes for an atomic cache copy could not be read.

Fields

§path: PathBuf

Source.

§source: Error

I/O failure.

§

WriteCacheFile

Atomic cache write failed.

Fields

§path: PathBuf

Destination/temporary.

§source: Error

I/O failure.

§

ConflictingCacheEntry(PathBuf)

Immutable content address already contains different bytes.

Trait Implementations§

Source§

impl Debug for DescriptorCacheError

Source§

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

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

impl Display for DescriptorCacheError

Source§

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

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

impl Error for DescriptorCacheError

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more