pub enum Error {
Application(ApplicationError),
Connection(ConnectionError),
Query(Box<QueryError>),
Pipeline(PipelineError),
InvalidPrimaryKey(InvalidPrimaryKeyValue),
Message(String),
}Expand description
An error of the client’s API.
Variants§
Application(ApplicationError)
A mutator or the API server raised it for the app.
Connection(ConnectionError)
The connection failed or the client is closed.
Query(Box<QueryError>)
The server could not run a query.
Pipeline(PipelineError)
A query could not be built or failed while it ran.
InvalidPrimaryKey(InvalidPrimaryKeyValue)
A row’s primary key is not a string, number, or boolean.
Message(String)
Anything else, with its message.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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<ApplicationError> for Error
impl From<ApplicationError> for Error
Source§fn from(e: ApplicationError) -> Self
fn from(e: ApplicationError) -> Self
Converts to this type from the input type.
Source§impl From<ConnectionError> for Error
impl From<ConnectionError> for Error
Source§fn from(e: ConnectionError) -> Self
fn from(e: ConnectionError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidPrimaryKeyValue> for Error
impl From<InvalidPrimaryKeyValue> for Error
Source§fn from(e: InvalidPrimaryKeyValue) -> Self
fn from(e: InvalidPrimaryKeyValue) -> Self
Converts to this type from the input type.
Source§impl From<PipelineError> for Error
impl From<PipelineError> for Error
Source§fn from(e: PipelineError) -> Self
fn from(e: PipelineError) -> Self
Converts to this type from the input type.
Source§impl From<QueryError> for Error
impl From<QueryError> for Error
Source§fn from(e: QueryError) -> Self
fn from(e: QueryError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Send for Error
impl !Sync for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl RefUnwindSafe for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe 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