#[non_exhaustive]pub enum MotorFinderError {
Request {
what: &'static str,
value: String,
},
Net(NetError),
Json(String),
Schema {
found: u32,
},
Count {
expected: u32,
found: usize,
},
Field {
field: String,
value: String,
},
OtherMotor {
asked: String,
found: String,
},
}Expand description
Why a motor finder request or answer was refused.
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.
Request
A request field is not one the API serves.
Net(NetError)
The fetch failed.
Json(String)
The body is not JSON of the expected shape: a field missing, or of the wrong type.
Schema
The answer is of another schema version than SCHEMA_VERSION.
Count
A list’s count disagrees with its length.
Field
A field breaks the API’s rules.
OtherMotor
A motor’s page is another motor’s.
Trait Implementations§
Source§impl Debug for MotorFinderError
impl Debug for MotorFinderError
Source§impl Display for MotorFinderError
impl Display for MotorFinderError
Source§impl Error for MotorFinderError
impl Error for MotorFinderError
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 MotorFinderError
impl !UnwindSafe for MotorFinderError
impl Freeze for MotorFinderError
impl Send for MotorFinderError
impl Sync for MotorFinderError
impl Unpin for MotorFinderError
impl UnsafeUnpin for MotorFinderError
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