pub enum EventError {
ParseError {
context: String,
source: Box<dyn Error + Send + Sync>,
},
StreamError {
context: String,
source: Box<dyn Error + Send + Sync>,
},
FilterError {
context: String,
source: Box<dyn Error + Send + Sync>,
},
HandlerError {
context: String,
source: Box<dyn Error + Send + Sync>,
},
Serialization(Error),
Io(Error),
InvalidConfig {
message: String,
},
NotFound {
resource: String,
},
Timeout {
duration: Duration,
},
Generic {
message: String,
},
}
Expand description
Main error type for event processing operations.
Variants§
ParseError
Event parsing failed
StreamError
Event stream error
FilterError
Event filtering error
HandlerError
Event handler error
Serialization(Error)
Serialization/deserialization error
Io(Error)
I/O error
InvalidConfig
Invalid configuration
NotFound
Resource not found
Timeout
Operation timeout
Generic
Generic event error
Implementations§
Source§impl EventError
impl EventError
Sourcepub fn parse_error<E: Error + Send + Sync + 'static>(
source: E,
context: impl Into<String>,
) -> Self
pub fn parse_error<E: Error + Send + Sync + 'static>( source: E, context: impl Into<String>, ) -> Self
Create a parse error with source preservation
Sourcepub fn stream_error<E: Error + Send + Sync + 'static>(
source: E,
context: impl Into<String>,
) -> Self
pub fn stream_error<E: Error + Send + Sync + 'static>( source: E, context: impl Into<String>, ) -> Self
Create a stream error with source preservation
Sourcepub fn filter_error<E: Error + Send + Sync + 'static>(
source: E,
context: impl Into<String>,
) -> Self
pub fn filter_error<E: Error + Send + Sync + 'static>( source: E, context: impl Into<String>, ) -> Self
Create a filter error with source preservation
Sourcepub fn handler_error<E: Error + Send + Sync + 'static>(
source: E,
context: impl Into<String>,
) -> Self
pub fn handler_error<E: Error + Send + Sync + 'static>( source: E, context: impl Into<String>, ) -> Self
Create a handler error with source preservation
Sourcepub fn invalid_config(message: impl Into<String>) -> Self
pub fn invalid_config(message: impl Into<String>) -> Self
Create an invalid configuration error
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Check if the error is retriable (follows riglr-core patterns)
Sourcepub fn to_tool_error(self) -> ToolError
pub fn to_tool_error(self) -> ToolError
Convert to ToolError for integration with riglr-core
Trait Implementations§
Source§impl Debug for EventError
impl Debug for EventError
Source§impl Display for EventError
impl Display for EventError
Source§impl Error for EventError
impl Error for EventError
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<&str> for EventError
impl From<&str> for EventError
Source§impl From<Error> for EventError
impl From<Error> for EventError
Source§impl From<Error> for EventError
impl From<Error> for EventError
Source§impl From<Error> for EventError
impl From<Error> for EventError
Source§impl From<EventError> for ToolError
impl From<EventError> for ToolError
Source§fn from(err: EventError) -> Self
fn from(err: EventError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EventError
impl !RefUnwindSafe for EventError
impl Send for EventError
impl Sync for EventError
impl Unpin for EventError
impl !UnwindSafe for EventError
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> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP