pub struct OrchestratorError { /* private fields */ }Expand description
Canonical error type returned by public orchestrator APIs.
Implementations§
Source§impl OrchestratorError
impl OrchestratorError
Sourcepub fn new(
category: ErrorCategory,
operation: &'static str,
source: impl Into<AnyError>,
) -> Self
pub fn new( category: ErrorCategory, operation: &'static str, source: impl Into<AnyError>, ) -> Self
Builds an error with an explicit category and operation label.
Sourcepub fn with_subject(self, subject: impl Into<String>) -> Self
pub fn with_subject(self, subject: impl Into<String>) -> Self
Attaches an optional resource or subject identifier to the error.
Sourcepub fn category(&self) -> ErrorCategory
pub fn category(&self) -> ErrorCategory
Returns the assigned error category.
Sourcepub fn user_input(operation: &'static str, source: impl Into<AnyError>) -> Self
pub fn user_input(operation: &'static str, source: impl Into<AnyError>) -> Self
Builds a ErrorCategory::UserInput error.
Sourcepub fn config_validation(
operation: &'static str,
source: impl Into<AnyError>,
) -> Self
pub fn config_validation( operation: &'static str, source: impl Into<AnyError>, ) -> Self
Builds a ErrorCategory::ConfigValidation error.
Sourcepub fn not_found(operation: &'static str, source: impl Into<AnyError>) -> Self
pub fn not_found(operation: &'static str, source: impl Into<AnyError>) -> Self
Builds a ErrorCategory::NotFound error.
Sourcepub fn invalid_state(
operation: &'static str,
source: impl Into<AnyError>,
) -> Self
pub fn invalid_state( operation: &'static str, source: impl Into<AnyError>, ) -> Self
Builds a ErrorCategory::InvalidState error.
Sourcepub fn security_denied(
operation: &'static str,
source: impl Into<AnyError>,
) -> Self
pub fn security_denied( operation: &'static str, source: impl Into<AnyError>, ) -> Self
Builds a ErrorCategory::SecurityDenied error.
Sourcepub fn external_dependency(
operation: &'static str,
source: impl Into<AnyError>,
) -> Self
pub fn external_dependency( operation: &'static str, source: impl Into<AnyError>, ) -> Self
Builds a ErrorCategory::ExternalDependency error.
Sourcepub fn internal_invariant(
operation: &'static str,
source: impl Into<AnyError>,
) -> Self
pub fn internal_invariant( operation: &'static str, source: impl Into<AnyError>, ) -> Self
Builds a ErrorCategory::InternalInvariant error.
Trait Implementations§
Source§impl Debug for OrchestratorError
impl Debug for OrchestratorError
Source§impl Display for OrchestratorError
impl Display for OrchestratorError
Source§impl Error for OrchestratorError
impl Error for OrchestratorError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for OrchestratorError
impl From<Error> for OrchestratorError
Source§impl From<Error> for OrchestratorError
impl From<Error> for OrchestratorError
Source§impl From<Error> for OrchestratorError
impl From<Error> for OrchestratorError
Source§impl From<Error> for OrchestratorError
impl From<Error> for OrchestratorError
Auto Trait Implementations§
impl Freeze for OrchestratorError
impl RefUnwindSafe for OrchestratorError
impl Send for OrchestratorError
impl Sync for OrchestratorError
impl Unpin for OrchestratorError
impl UnsafeUnpin for OrchestratorError
impl UnwindSafe for OrchestratorError
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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
Source§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request