pub enum ApiError {
NotFound(String),
UnexpectedError,
EventCreationError {
source: EventCreationError,
},
InternalError {
source: ResponseError,
},
InvalidParameters,
SignError,
VoteNotNeeded(String),
}
Expand description
Errors that may occur when using the TAPLE API
Variants
NotFound(String)
An item of the protocol has not been found, for example, a subject
UnexpectedError
An unexpected error has occurred
EventCreationError
An error has occurred in the process of creating an event.
InternalError
An internal error has occurred
InvalidParameters
Invalid parameters have been entered, usually identifiers.
SignError
An error occurred during a signature process
VoteNotNeeded(String)
No permissions required or possessed to vote on an event request.
Trait Implementations
sourceimpl Error for ApiError
impl Error for ApiError
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()
Auto Trait Implementations
impl RefUnwindSafe for ApiError
impl Send for ApiError
impl Sync for ApiError
impl Unpin for ApiError
impl UnwindSafe for ApiError
Blanket Implementations
impl<T> AsFail for Twhere
T: Fail,
impl<T> AsFail for Twhere
T: Fail,
fn as_fail(&self) -> &(dyn Fail + 'static)
fn as_fail(&self) -> &(dyn Fail + 'static)
Converts a reference to
Self
into a dynamic trait object of Fail
.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
impl<E> Fail for Ewhere
E: 'static + Error + Send + Sync,
impl<E> Fail for Ewhere
E: 'static + Error + Send + Sync,
fn cause(&self) -> Option<&(dyn Fail + 'static)>
fn cause(&self) -> Option<&(dyn Fail + 'static)>
Returns a reference to the underlying cause of this failure, if it
is an error that wraps other errors. Read more
fn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
Returns a reference to the
Backtrace
carried by this failure, if it
carries one. Read more