#[non_exhaustive]pub enum InterceptionError {
Call(Box<CallError>),
InvalidPattern(String),
AlreadyStarted,
NotStarted,
SubscriptionClosed,
InvalidResponse(String),
WrongStage,
}Expand description
Errors surfaced by the interception API.
The Self::Call variant is boxed so the enum stays small
(size_of::<usize>() for the heavy arm). Without boxing, every
Result<T, InterceptionError> would carry the full
zendriver_transport::CallError payload — large enough to trip
clippy’s result_large_err lint at every fallible call site.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Call(Box<CallError>)
InvalidPattern(String)
AlreadyStarted
NotStarted
SubscriptionClosed
InvalidResponse(String)
WrongStage
Trait Implementations§
Source§impl Debug for InterceptionError
impl Debug for InterceptionError
Source§impl Display for InterceptionError
impl Display for InterceptionError
Source§impl Error for InterceptionError
impl Error for InterceptionError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for InterceptionError
impl !UnwindSafe for InterceptionError
impl Freeze for InterceptionError
impl Send for InterceptionError
impl Sync for InterceptionError
impl Unpin for InterceptionError
impl UnsafeUnpin for InterceptionError
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