pub struct DeltaApiError(pub DeltaBackendError);Expand description
The error half of every Delta handler Result.
Wraps a DeltaBackendError; the crate’s own logic errors are constructed via
the helper constructors (invalid_argument, etc.).
Its IntoResponse serializes the Delta API error envelope.
Tuple Fields§
§0: DeltaBackendErrorImplementations§
Source§impl DeltaApiError
impl DeltaApiError
Sourcepub fn invalid_argument(message: impl Into<String>) -> Self
pub fn invalid_argument(message: impl Into<String>) -> Self
A 400 InvalidParameterValueException from crate logic (e.g. contract validation).
Sourcepub fn permission_denied(message: impl Into<String>) -> Self
pub fn permission_denied(message: impl Into<String>) -> Self
A 403 PermissionDeniedException.
Sourcepub fn not_implemented(what: &'static str) -> Self
pub fn not_implemented(what: &'static str) -> Self
A 501 NotImplementedException.
Trait Implementations§
Source§impl Debug for DeltaApiError
impl Debug for DeltaApiError
Source§impl Display for DeltaApiError
impl Display for DeltaApiError
Source§impl Error for DeltaApiError
impl Error for DeltaApiError
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<DeltaBackendError> for DeltaApiError
impl From<DeltaBackendError> for DeltaApiError
Source§fn from(source: DeltaBackendError) -> Self
fn from(source: DeltaBackendError) -> Self
Converts to this type from the input type.
Source§impl IntoResponse for DeltaApiError
impl IntoResponse for DeltaApiError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for DeltaApiError
impl RefUnwindSafe for DeltaApiError
impl Send for DeltaApiError
impl Sync for DeltaApiError
impl Unpin for DeltaApiError
impl UnsafeUnpin for DeltaApiError
impl UnwindSafe for DeltaApiError
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