pub enum ContractResult {
Ok,
Warn(String),
Error(String),
Tier1Compatible(Vec<String>),
Tier2Compatible(Vec<String>),
}Expand description
The outcome of a single middleware contract check.
Variants§
Ok
The middleware exports the interface and the type fingerprints match.
Warn(String)
The middleware could not be validated — either no path was provided or the middleware does not export the contracted interface. Injection can still proceed, but type safety is unconfirmed.
Error(String)
The middleware exports the interface but with an incompatible type fingerprint. Injection should be blocked.
Tier1Compatible(Vec<String>)
The middleware does not export the target interface but does export at
least one tier-1 type-erased interface (splicer:tier1/{before,after,blocking}).
The inner list names the matched interfaces so the adapter generator knows
exactly which hooks to wire up.
Tier2Compatible(Vec<String>)
The middleware exports at least one tier-2 interface
(splicer:tier2/{before,after,trap}). The inner list names the
matched interfaces so the adapter generator knows exactly
which hooks to wire up.
Trait Implementations§
Source§impl Clone for ContractResult
impl Clone for ContractResult
Source§fn clone(&self) -> ContractResult
fn clone(&self) -> ContractResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContractResult
impl Debug for ContractResult
Source§impl PartialEq for ContractResult
impl PartialEq for ContractResult
Source§fn eq(&self, other: &ContractResult) -> bool
fn eq(&self, other: &ContractResult) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContractResult
Auto Trait Implementations§
impl Freeze for ContractResult
impl RefUnwindSafe for ContractResult
impl Send for ContractResult
impl Sync for ContractResult
impl Unpin for ContractResult
impl UnsafeUnpin for ContractResult
impl UnwindSafe for ContractResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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