#[non_exhaustive]pub enum Error {
Url(String),
Http(Error),
Status {
status: u16,
body: String,
},
Msearch {
slot: usize,
status: u16,
body: String,
},
UnexpectedIndex {
index: String,
},
Decode(Error),
}Expand description
Anything that can go wrong building a request, talking to OpenSearch, or decoding a response.
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.
Url(String)
The base URL handed to crate::Client::connect was not a usable
http/https URL.
Http(Error)
The underlying HTTP transport failed (connection, timeout, TLS, …).
Status
OpenSearch answered with a non-success status. body is the raw payload,
captured for diagnostics.
Msearch
One slot of a crate::Client::msearch bundle failed. _msearch
reports errors per slot; the whole call fails on the first one — there
are no partial results.
Fields
UnexpectedIndex
A combined-search hit came from an index no
FlussoMultiDocument variant claims.
Decode(Error)
A response could not be decoded into the expected shape.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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