Skip to main content

ResolveError

Enum ResolveError 

Source
pub enum ResolveError {
    Io(Error),
    Git(GitError),
    Lisp(LispError),
    Manifesto(LeituraError),
    MissingPin {
        nome: String,
    },
    MissingPath {
        nome: String,
        path: PathBuf,
    },
    Cycle(String),
}

Variants§

§

Io(Error)

§

Git(GitError)

§

Lisp(LispError)

§

Manifesto(LeituraError)

A resolved dep’s caixa.lisp did not read as a package manifest.

Distinct from Self::Lisp because the interesting case is LeituraError::DialetoEstrangeiro: a dep whose manifest is a repo-surface declaration rather than a package manifest is not a syntax error in that dep, it is the wrong KIND of file, and a resolver that flattened both into “lisp: …” would send the author hunting for a typo that is not there.

§

MissingPin

Fields

§nome: String
§

MissingPath

Fields

§nome: String
§path: PathBuf
§

Cycle(String)

Implementations§

Source§

impl ResolveError

Source

pub fn missing_path(nome: &str, path: impl Into<PathBuf>) -> ResolveError

Substrate primitive constructor for the per-Dep :fonte (:tipo path :caminho …) on-disk-absence refusal diagnostic. Folds the pre-lift open-coded four-line Err(ResolveError::MissingPath { nome: dep.nome().to_string(), path }) two-slot struct-literal inside [fetch_path] onto one dispatch. Peer with the sibling one-slot MissingPin { nome: String } variant on the same envelope, which the paired Self::missing_pin ctor now folds onto its own substrate primitive on [fetch_git]’s .ok_or_else closure-form emission arm. Every future consumer that surfaces the same on-disk-absence diagnostic outside fetch_path — a deferred feira lock --path-only pre-flight probe, a per-lacre overlay resolver rejecting a cluster-local :caminho overlay that vanished between resolve passes, the M4 mesh.pleme.io/v1alpha1/ Caixa CR admission webhook re-checking a per-:fonte-patched candidate before the closure walker re-fires — reaches the variant through one call rather than re-inlining the two-slot struct-literal in lockstep with [fetch_path]’s wire-up.

The nome: &str parameter accepts &str literals and &String via Deref coercion so the sole in-crate wire-up threads dep.nome() (a &str accessor via Dep::nome) through the ctor without a pre-conversion; the path: impl Into<PathBuf> parameter takes the observed on-disk-absent PathBuf built at the caller from PathBuf::from(caminho) and forwards it through the From<PathBuf> identity into the variant slot without an extra allocation.

Source

pub fn missing_pin(nome: &str) -> ResolveError

Substrate primitive constructor for the per-Dep :fonte (:tipo git …)-arm sole-set-pin absence refusal diagnostic. Folds the pre-lift open-coded three-line ResolveError::MissingPin { nome: dep.nome().to_string() } one-slot struct-literal inside [fetch_git]’s .ok_or_else closure-form emission arm onto one dispatch. Peer with the sibling two-slot Self::missing_path ctor on the same envelope’s on-disk-absence refusal axis — this ctor closes the paired closure-form emission axis on the :fonte (:tipo git …)-arm’s pin-precedence projection (DepSource::sole_pin) through which every author-omitted-and-default-host-shorthand- expanded Git source (expand_fonte(dep, default_host) on a Dep::simple(...) bare dep) reaches [fetch_git] with all three tag/rev/branch pins None. Every future consumer that surfaces the same sole-set-pin absence diagnostic outside [fetch_git] — a deferred feira lock --dry-run pre-flight per-:deps pin-presence probe that refuses before the closure walker fires a single git clone, a per-lacre overlay resolver rejecting a cluster-local :fonte overlay whose pin axis was dropped between resolve passes, the M4 mesh.pleme.io/v1alpha1/Caixa CR admission webhook re-checking a per-:fonte-patched candidate before the closure walker re-fires — reaches the variant through one call rather than re-inlining the one-slot struct-literal in lockstep with [fetch_git]’s closure-form emission arm.

The nome: &str parameter accepts &str literals and &String via Deref coercion so the sole in-crate wire-up threads dep.nome() (a &str accessor via Dep::nome) through the ctor without a pre-conversion, byte-parallel to the sibling Self::missing_path ctor’s nome parameter.

Trait Implementations§

Source§

impl Debug for ResolveError

Source§

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

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

impl Display for ResolveError

Source§

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

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

impl Error for ResolveError

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

impl From<Error> for ResolveError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<GitError> for ResolveError

Source§

fn from(source: GitError) -> Self

Converts to this type from the input type.
Source§

impl From<LeituraError> for ResolveError

Source§

fn from(source: LeituraError) -> Self

Converts to this type from the input type.
Source§

impl From<LispError> for ResolveError

Source§

fn from(source: LispError) -> Self

Converts to this type from the input type.

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> 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, <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.