Enum couch_rs::error::CouchError
source · pub enum CouchError {
OperationFailed(ErrorDetails),
InvalidJson(ErrorMessage),
MalformedUrl(ErrorMessage),
CreateDesignFailed(ErrorMessage),
}
Variants§
OperationFailed(ErrorDetails)
A CouchDB operation failed, typically indicated by a specific HTTP error status that was returned.
InvalidJson(ErrorMessage)
Parsing of a JSON document failed.
MalformedUrl(ErrorMessage)
The provided url is invalid.
CreateDesignFailed(ErrorMessage)
A design document could not be created.
Implementations§
source§impl CouchError
impl CouchError
pub fn new(message: String, status: StatusCode) -> CouchError
pub fn new_with_id( id: Option<String>, message: String, status: StatusCode ) -> CouchError
pub fn is_not_found(&self) -> bool
pub fn status(&self) -> Option<StatusCode>
Trait Implementations§
source§impl Clone for CouchError
impl Clone for CouchError
source§fn clone(&self) -> CouchError
fn clone(&self) -> CouchError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CouchError
impl Debug for CouchError
source§impl Display for CouchError
impl Display for CouchError
source§impl Error for CouchError
impl Error for CouchError
source§fn 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 · 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 CouchError
impl From<Error> for CouchError
source§impl From<Error> for CouchError
impl From<Error> for CouchError
source§impl From<ParseError> for CouchError
impl From<ParseError> for CouchError
source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CouchError
impl !RefUnwindSafe for CouchError
impl Send for CouchError
impl Sync for CouchError
impl Unpin for CouchError
impl !UnwindSafe for CouchError
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