pub struct WrapperResolver { /* private fields */ }Expand description
Resolves a WrapperPlan for a parsed op template.
Stateless apart from the session config it holds (the default-order tiebreaker). Repeated calls with the same inputs produce identical plans.
Implementations§
Source§impl WrapperResolver
impl WrapperResolver
Sourcepub fn with_default_order(
registry: &WrapperRegistry,
) -> Result<Self, ResolveError>
pub fn with_default_order( registry: &WrapperRegistry, ) -> Result<Self, ResolveError>
Construct a resolver with the built-in default order.
Sourcepub fn from_names(
names: &[&str],
registry: &WrapperRegistry,
) -> Result<Self, ResolveError>
pub fn from_names( names: &[&str], registry: &WrapperRegistry, ) -> Result<Self, ResolveError>
Construct a resolver from an explicit list of wrapper
names (innermost-to-outermost). Validates against the
registry’s constraint graph; rejects unknown names and
orderings that violate forbids_outer.
Sourcepub fn resolve(
&self,
subject: WrapperSubject<'_>,
registry: &WrapperRegistry,
) -> Result<WrapperPlan, ResolveError>
pub fn resolve( &self, subject: WrapperSubject<'_>, registry: &WrapperRegistry, ) -> Result<WrapperPlan, ResolveError>
Resolve the wrapper plan for one op template.
Sourcepub fn default_order(&self) -> &[WrapperName]
pub fn default_order(&self) -> &[WrapperName]
The innermost-to-outermost default order this resolver
uses as a tiebreaker. Useful for diagnostics
(nmbrs describe wrappers).
Sourcepub fn resolve_with_order(
&self,
subject: WrapperSubject<'_>,
registry: &WrapperRegistry,
order: &[&str],
) -> Result<WrapperPlan, ResolveError>
pub fn resolve_with_order( &self, subject: WrapperSubject<'_>, registry: &WrapperRegistry, order: &[&str], ) -> Result<WrapperPlan, ResolveError>
SRD-32a Push 3 — resolve a plan using an explicit per-op innermost-to-outermost order list. The list MUST be a permutation of the wrappers triggered on this op (after transitive activation):
- listing a wrapper whose trigger doesn’t fire is a hard error (silently dropping it would mask typos),
- omitting one whose trigger does fire is a hard error (skipping a wrapper changes semantics).
All other constraint checks (mutually_exclusive_with,
requires_inner cycles, forbids_outer) run exactly
as they do for the default-order path — same code,
same error shapes.
Auto Trait Implementations§
impl Freeze for WrapperResolver
impl RefUnwindSafe for WrapperResolver
impl Send for WrapperResolver
impl Sync for WrapperResolver
impl Unpin for WrapperResolver
impl UnsafeUnpin for WrapperResolver
impl UnwindSafe for WrapperResolver
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 more