Struct elasticsearch::Error
source · pub struct Error { /* private fields */ }
Expand description
An error with the client.
Errors that can occur include IO and parsing errors, as well as specific errors from Elasticsearch and internal errors from the client.
Implementations
sourceimpl Error
impl Error
sourcepub fn status_code(&self) -> Option<StatusCode>
pub fn status_code(&self) -> Option<StatusCode>
The status code, if the error was generated from a response
sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Returns true if the error is related to a timeout
Trait Implementations
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourceimpl From<BuildError> for Error
impl From<BuildError> for Error
sourcefn from(err: BuildError) -> Error
fn from(err: BuildError) -> Error
Converts to this type from the input type.
sourceimpl From<ParseError> for Error
impl From<ParseError> for Error
sourcefn from(err: ParseError) -> Error
fn from(err: ParseError) -> Error
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more