pub enum Mecha10Error {
Show 33 variants
NodeInit(String),
NodeFailed {
node_name: String,
message: String,
},
NodeNotFound(String),
ConfigValidation {
field: String,
message: String,
expected: String,
got: String,
suggestion: String,
},
ConfigNotFound {
path: PathBuf,
env_var: String,
},
ConfigInvalid(String, String),
Configuration(String),
MessagingError {
message: String,
suggestion: String,
},
MessagingConnectionFailed {
url: String,
suggestion: String,
},
PublishFailed {
topic: String,
reason: String,
},
SubscribeFailed {
topic: String,
reason: String,
},
DeserializationFailed {
topic: String,
expected_type: String,
error: String,
},
SerializationFailed(String),
SerializationError {
message: String,
suggestion: String,
},
CircuitBreakerOpen {
service: String,
message: String,
},
ModelLoadFailed {
uri: String,
reason: String,
suggestion: String,
},
InferenceFailed(String),
ModelNotFound {
model_name: String,
version: String,
mlflow_url: String,
},
ModelChecksumMismatch {
expected: String,
got: String,
},
BuildFailed {
node_name: String,
stderr: String,
},
HotReloadFailed(String),
Runtime(String),
Timeout {
timeout_ms: u64,
operation: String,
},
Shutdown(String),
FileNotFound {
path: PathBuf,
suggestion: String,
},
Io(Error),
IoError {
message: String,
suggestion: String,
},
Json(Error),
Yaml(String),
Redis(String),
Database(String),
Http(String),
Other(String),
}Expand description
Main error type for the Mecha10 framework
Variants§
NodeInit(String)
NodeFailed
NodeNotFound(String)
ConfigValidation
ConfigNotFound
ConfigInvalid(String, String)
Configuration(String)
MessagingError
MessagingConnectionFailed
PublishFailed
SubscribeFailed
DeserializationFailed
SerializationFailed(String)
SerializationError
CircuitBreakerOpen
ModelLoadFailed
InferenceFailed(String)
ModelNotFound
ModelChecksumMismatch
BuildFailed
HotReloadFailed(String)
Runtime(String)
Timeout
Shutdown(String)
FileNotFound
Io(Error)
IoError
Json(Error)
Yaml(String)
Redis(String)
Database(String)
Http(String)
Other(String)
Implementations§
Source§impl Mecha10Error
impl Mecha10Error
Sourcepub fn connection_failed(url: impl Into<String>) -> Self
pub fn connection_failed(url: impl Into<String>) -> Self
Create a connection error with helpful suggestions
Sourcepub fn config_validation(
field: impl Into<String>,
message: impl Into<String>,
expected: impl Into<String>,
got: impl Into<String>,
suggestion: impl Into<String>,
) -> Self
pub fn config_validation( field: impl Into<String>, message: impl Into<String>, expected: impl Into<String>, got: impl Into<String>, suggestion: impl Into<String>, ) -> Self
Create a config validation error with clear expectations
Sourcepub fn model_load_failed(
uri: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn model_load_failed( uri: impl Into<String>, reason: impl Into<String>, ) -> Self
Create a model load error with helpful suggestions
Sourcepub fn messaging_error(
message: impl Into<String>,
suggestion: impl Into<String>,
) -> Self
pub fn messaging_error( message: impl Into<String>, suggestion: impl Into<String>, ) -> Self
Create a messaging error with a helpful suggestion
Sourcepub fn configuration(message: impl Into<String>) -> Self
pub fn configuration(message: impl Into<String>) -> Self
Create a configuration error with context
Trait Implementations§
Source§impl Debug for Mecha10Error
impl Debug for Mecha10Error
Source§impl Display for Mecha10Error
impl Display for Mecha10Error
Source§impl Error for Mecha10Error
impl Error for Mecha10Error
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 Mecha10Error
impl From<Error> for Mecha10Error
Source§impl From<Error> for Mecha10Error
impl From<Error> for Mecha10Error
Auto Trait Implementations§
impl Freeze for Mecha10Error
impl !RefUnwindSafe for Mecha10Error
impl Send for Mecha10Error
impl Sync for Mecha10Error
impl Unpin for Mecha10Error
impl !UnwindSafe for Mecha10Error
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
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>
Converts
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>
Converts
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.