pub struct Rejection {
pub middleware: String,
pub point: InterceptPoint,
pub reason: String,
pub detail: Option<String>,
}Expand description
A structured middleware rejection: which layer, at which point, and why.
The typed contract at the middleware API. When a rejection leaves the
chain it maps onto the crate’s string-payload error taxonomy by
interception point (node run → RustyError::Node, model call →
RustyError::Llm, tool call → RustyError::Tool), with this
struct’s canonical Display as the message —
keeping RustyError additive-free for downstream exhaustive matches.
Fields§
§middleware: StringThe rejecting layer (Middleware::name).
point: InterceptPointThe interception point that rejected.
reason: StringMachine-readable reason code (e.g. "tool_blocked").
detail: Option<String>Optional human-readable detail.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rejection
impl<'de> Deserialize<'de> for Rejection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Rejection
Auto Trait Implementations§
impl Freeze for Rejection
impl RefUnwindSafe for Rejection
impl Send for Rejection
impl Sync for Rejection
impl Unpin for Rejection
impl UnsafeUnpin for Rejection
impl UnwindSafe for Rejection
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
Mutably borrows from an owned value. Read more