#[non_exhaustive]pub enum CassetteError {
Io(Error),
Json(Error),
RequestMismatch(String),
ServerPanicked,
Incomplete {
observed: usize,
expected: usize,
},
}Expand description
Errors produced by cassette construction, serving, or verification.
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.
Io(Error)
A loopback socket operation failed.
Json(Error)
JSON serialization or validation failed.
RequestMismatch(String)
A request did not match its scripted exchange.
ServerPanicked
The server thread panicked.
Incomplete
Not every scripted exchange was consumed.
Trait Implementations§
Source§impl Debug for CassetteError
impl Debug for CassetteError
Source§impl Display for CassetteError
impl Display for CassetteError
Source§impl Error for CassetteError
impl Error for CassetteError
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<Error> for CassetteError
impl From<Error> for CassetteError
Auto Trait Implementations§
impl !RefUnwindSafe for CassetteError
impl !UnwindSafe for CassetteError
impl Freeze for CassetteError
impl Send for CassetteError
impl Sync for CassetteError
impl Unpin for CassetteError
impl UnsafeUnpin for CassetteError
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