#[non_exhaustive]pub enum RuntimeError {
UnknownOperation {
name: String,
},
MissingHandler {
name: String,
},
Handler {
name: String,
code: String,
message: String,
},
Denied {
name: String,
code: String,
message: String,
},
ReceiptSink {
name: String,
message: String,
caused_by_handler: Option<ReceiptSinkHandlerCause>,
},
StatusSink {
name: String,
message: String,
caused_by_handler: Option<ReceiptSinkHandlerCause>,
},
}Expand description
Error returned by synchronous operation dispatch.
#[non_exhaustive] so the wire-error vocabulary can grow (e.g.
rate-limit, auth, schema-mismatch variants) without breaking
downstream matches that translate RuntimeError into transport-
layer error codes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownOperation
The requested operation name is not known to the runtime.
MissingHandler
The operation descriptor exists, but no handler is available.
Handler
The handler rejected the invocation.
Fields
Denied
Runtime policy denied the invocation. Admission guards and observed
effect-row enforcement both record a Denied receipt before returning
this variant.
Fields
ReceiptSink
The configured receipt sink rejected a runtime-emitted receipt.
Fields
caused_by_handler: Option<ReceiptSinkHandlerCause>Handler failure that preceded this sink failure, when present.
StatusSink
The configured operation-status sink rejected a runtime-emitted fact.
Implementations§
Source§impl RuntimeError
impl RuntimeError
Sourcepub fn unknown_operation(name: impl Into<String>) -> Self
pub fn unknown_operation(name: impl Into<String>) -> Self
Build an unknown-operation error.
Sourcepub fn missing_handler(name: impl Into<String>) -> Self
pub fn missing_handler(name: impl Into<String>) -> Self
Build a missing-handler error.
Sourcepub fn handler(
name: impl Into<String>,
code: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn handler( name: impl Into<String>, code: impl Into<String>, message: impl Into<String>, ) -> Self
Build a handler error with an operation name and message.
Sourcepub fn denied(
name: impl Into<String>,
code: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn denied( name: impl Into<String>, code: impl Into<String>, message: impl Into<String>, ) -> Self
Build an admission-denied error with an operation name, class, and message.
Sourcepub fn receipt_sink(name: impl Into<String>, message: impl Into<String>) -> Self
pub fn receipt_sink(name: impl Into<String>, message: impl Into<String>) -> Self
Build a receipt-sink error with an operation name and message.
Sourcepub fn receipt_sink_after_handler_failure(
name: impl Into<String>,
message: impl Into<String>,
cause: ReceiptSinkHandlerCause,
) -> Self
pub fn receipt_sink_after_handler_failure( name: impl Into<String>, message: impl Into<String>, cause: ReceiptSinkHandlerCause, ) -> Self
Build a receipt-sink error after a handler failure.
Sourcepub fn status_sink(name: impl Into<String>, message: impl Into<String>) -> Self
pub fn status_sink(name: impl Into<String>, message: impl Into<String>) -> Self
Build a status-sink error with an operation name and message.
Sourcepub fn status_sink_after_handler_failure(
name: impl Into<String>,
message: impl Into<String>,
cause: ReceiptSinkHandlerCause,
) -> Self
pub fn status_sink_after_handler_failure( name: impl Into<String>, message: impl Into<String>, cause: ReceiptSinkHandlerCause, ) -> Self
Build a status-sink error after a handler failure.
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
impl Eq for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
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()
Source§impl PartialEq for RuntimeError
impl PartialEq for RuntimeError
Source§fn eq(&self, other: &RuntimeError) -> bool
fn eq(&self, other: &RuntimeError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RuntimeError
Auto Trait Implementations§
impl Freeze for RuntimeError
impl RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnsafeUnpin for RuntimeError
impl UnwindSafe for RuntimeError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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