pub struct RelayError {
pub msg_id: u64,
pub error: Arc<dyn Error + Send + Sync>,
pub source: &'static str,
}Expand description
Error from a downstream handler in the stream.
Errors are cloneable (via Arc) and can flow both:
- Through the stream (subscribable via
subscribe::<RelayError>()) - Back to senders (via
send().awaitreturningErr(SendError::Downstream(...)))
Fields§
§msg_id: u64The message ID that caused this error (0 if unknown).
error: Arc<dyn Error + Send + Sync>The underlying error.
source: &'static strCoarse provenance indicator for the error source.
This should be a compile-time constant string like “sink”, “tap”, “within”, “subscription”, or “forwarder”. Not intended for user input.
Implementations§
Trait Implementations§
Source§impl Clone for RelayError
impl Clone for RelayError
Source§fn clone(&self) -> RelayError
fn clone(&self) -> RelayError
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 RelayError
impl Debug for RelayError
Source§impl Display for RelayError
impl Display for RelayError
Source§impl Error for RelayError
impl Error for RelayError
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()
Auto Trait Implementations§
impl Freeze for RelayError
impl !RefUnwindSafe for RelayError
impl Send for RelayError
impl Sync for RelayError
impl Unpin for RelayError
impl !UnwindSafe for RelayError
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