pub enum ResolveError {
ForbiddenOuter {
inner: WrapperName,
outer: WrapperName,
},
MutuallyExclusive {
a: WrapperName,
b: WrapperName,
a_reason: WrapperActivation,
b_reason: WrapperActivation,
},
ConstraintCycle {
cycle: Vec<WrapperName>,
},
UnknownWrapper {
name: String,
suggestion: Option<&'static str>,
},
DanglingRequiresInner {
from: WrapperName,
missing: WrapperName,
},
OverridePermutationMismatch {
missing: Option<WrapperName>,
extra: Option<WrapperName>,
},
}Expand description
Errors the resolver may surface. Each variant carries enough context for the caller to render an actionable diagnostic without re-walking the registry.
Variants§
ForbiddenOuter
forbids_outer violation — wrapper inner declared
outer must not wrap it, but the resolved order
placed outer outside inner.
MutuallyExclusive
mutually_exclusive_with violation — both triggered
for the same op.
ConstraintCycle
Constraint graph contains a requires_inner cycle
(e.g. A.requires_inner = [B] and B.requires_inner =
[A]). Almost always a registry-author bug; surface
at session start.
Fields
cycle: Vec<WrapperName>UnknownWrapper
Override referenced an unknown wrapper name. Carries the closest registered name as a typo suggestion when available.
DanglingRequiresInner
requires_inner pointed at a wrapper that doesn’t
exist in the registry. Almost always a registry-author
bug.
OverridePermutationMismatch
SRD-32a Push 3 — an explicit wrappers: { order: [...] }
override is not a permutation of the wrappers triggered
on the op. Either a triggered wrapper is missing from
the override (missing), or the override names a
wrapper whose trigger doesn’t fire (extra). Exactly
one of missing/extra is set per error; the resolver
reports the first violation it finds.
Trait Implementations§
Source§impl Debug for ResolveError
impl Debug for ResolveError
Source§impl Display for ResolveError
impl Display for ResolveError
Source§impl Error for ResolveError
impl Error for ResolveError
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()
Auto Trait Implementations§
impl Freeze for ResolveError
impl RefUnwindSafe for ResolveError
impl Send for ResolveError
impl Sync for ResolveError
impl Unpin for ResolveError
impl UnsafeUnpin for ResolveError
impl UnwindSafe for ResolveError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more