Skip to main content

ResolveOutcome

Enum ResolveOutcome 

Source
pub enum ResolveOutcome {
    Found(HostId),
    Skipped(SourceKind),
    Errored(SourceKind, Error),
}
Expand description

One source’s outcome in a full-chain walk.

Returned by crate::Resolver::resolve_all (and the free crate::resolve_all / [crate::resolve_all_with_transport] wrappers) for every source in the chain, in chain order. Unlike crate::Resolver::resolve, a full walk does not short-circuit on the first success or the first error — every source is consulted.

Use this when you want to audit what each source would produce (diagnostics, operator tooling, test harnesses). For normal resolution use crate::resolve — it stops at the first usable source.

Variants§

§

Found(HostId)

The source produced a usable identifier.

§

Skipped(SourceKind)

The source had nothing to offer (file absent, endpoint unreachable, feature disabled, wrong platform).

§

Errored(SourceKind, Error)

The source produced a hard error. In a short-circuiting resolve() this would have aborted the chain; in resolve_all the error is captured here and the walk continues.

The outer SourceKind and the inner crate::Error::source_kind are guaranteed to be equal. The field on this variant is the authoritative provenance for callers matching outcomes — introspecting the inner Error for its kind is equivalent but noisier.

Implementations§

Source§

impl ResolveOutcome

Source

pub fn source(&self) -> SourceKind

Which source produced this outcome.

Source

pub fn host_id(&self) -> Option<&HostId>

The HostId if the source produced one, else None.

Trait Implementations§

Source§

impl Debug for ResolveOutcome

Source§

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

Formats the value using the given formatter. 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, 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.