pub enum ProcessError {
InvalidInput(String),
Unavailable(String),
Internal(String),
DeadlineExceeded,
Fatal(String),
}Expand description
Rust mapping of the WIT process-error variant.
This type has exactly 5 variants matching the WIT definition in
torvyn:streaming@0.1.0 (Doc 01, Section 3.1). It is the error type
returned by component invocations (process, pull, push).
§Variants
InvalidInput— input element was malformed or violated the contract.Unavailable— a required resource or service was unavailable.Internal— unexpected internal error within the component.DeadlineExceeded— the processing deadline has passed.Fatal— the component is permanently unable to process further elements.
§Examples
use torvyn_types::ProcessError;
let err = ProcessError::InvalidInput("expected JSON, got binary".into());
assert!(format!("{}", err).contains("expected JSON"));Variants§
InvalidInput(String)
The input element was malformed or violated the expected contract.
A resource or service required by the component was unavailable.
Internal(String)
An unexpected internal error occurred within the component.
DeadlineExceeded
The component’s processing deadline has been exceeded.
Fatal(String)
The component is permanently unable to process further elements. This is a terminal error — the runtime will not send more elements.
Implementations§
Trait Implementations§
Source§impl Clone for ProcessError
impl Clone for ProcessError
Source§fn clone(&self) -> ProcessError
fn clone(&self) -> ProcessError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProcessError
impl Debug for ProcessError
Source§impl<'de> Deserialize<'de> for ProcessError
impl<'de> Deserialize<'de> for ProcessError
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
Source§impl Display for ProcessError
impl Display for ProcessError
Source§impl Error for ProcessError
impl Error for ProcessError
1.30.0 · 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<&ProcessError> for ProcessErrorKind
impl From<&ProcessError> for ProcessErrorKind
Source§fn from(err: &ProcessError) -> Self
fn from(err: &ProcessError) -> Self
Converts to this type from the input type.
Source§impl From<ProcessError> for TorvynError
impl From<ProcessError> for TorvynError
Source§fn from(e: ProcessError) -> Self
fn from(e: ProcessError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ProcessError
impl PartialEq for ProcessError
Source§impl Serialize for ProcessError
impl Serialize for ProcessError
impl Eq for ProcessError
impl StructuralPartialEq for ProcessError
Auto Trait Implementations§
impl Freeze for ProcessError
impl RefUnwindSafe for ProcessError
impl Send for ProcessError
impl Sync for ProcessError
impl Unpin for ProcessError
impl UnwindSafe for ProcessError
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