Skip to main content

BackendError

Enum BackendError 

Source
pub enum BackendError {
    InitializationError(String),
    ProcessingError(String),
    ModelError(String),
    CommunicationError(String),
    InvalidInput(String),
    Protocol(ProtocolError),
}
Expand description

Errors returned by crate::IpcBackend and crate::HybridFlowBackend.

These cover initialization, processing, model persistence, IPC communication, invalid caller input, and structured-message protocol rejection. Most variants carry a human-readable String. BackendError::Protocol carries a ProtocolError so a hybrid-flow receiver can reject an unexpected crate::IpcMessage variant without overloading a transport or validation failure.

Variants§

§

InitializationError(String)

Backend failed to initialize (e.g. model load failure, ZMQ connect error).

§

ProcessingError(String)

Error during process_batch (e.g. shape mismatch, backend internal failure).

§

ModelError(String)

Model save/load or filesystem I/O error.

§

CommunicationError(String)

IPC / transport communication error (ZMQ send/recv, framing, timeout).

§

InvalidInput(String)

Caller supplied invalid input (e.g. empty batch where disallowed, bad config).

§

Protocol(ProtocolError)

A structured message was valid on the wire but not acceptable for this call.

Hybrid-flow receivers return this when an inbound crate::IpcMessage decodes and validates, then turns out to be a different variant than the method accepts. The frame is already consumed; it is not dropped silently and it is not retried.

Trait Implementations§

Source§

impl Debug for BackendError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BackendError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for BackendError

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ProtocolError> for BackendError

Source§

fn from(source: ProtocolError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.