pub struct GatewayApiError<D = Value> {
pub kind: GatewayErrorKind,
pub msg: String,
pub data: D,
pub sensitive: bool,
}Fields§
§kind: GatewayErrorKind§msg: String§data: DStructured data associated with this error.
sensitive: boolWhether data contains sensitive information that Lexe
shouldn’t see (e.g. a route). Such data may still be logged by
the app or in SDKs but shouldn’t be logged inside Lexe infra.
Implementations§
Source§impl GatewayApiError
impl GatewayApiError
pub fn fiat_rates_missing() -> GatewayApiError
Trait Implementations§
Source§impl<D> Clone for GatewayApiError<D>where
D: Clone,
impl<D> Clone for GatewayApiError<D>where
D: Clone,
Source§fn clone(&self) -> GatewayApiError<D>
fn clone(&self) -> GatewayApiError<D>
Returns a duplicate 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<D> Debug for GatewayApiError<D>where
D: Debug,
impl<D> Debug for GatewayApiError<D>where
D: Debug,
Source§impl<D> Default for GatewayApiError<D>where
D: Default,
impl<D> Default for GatewayApiError<D>where
D: Default,
Source§fn default() -> GatewayApiError<D>
fn default() -> GatewayApiError<D>
Returns the “default value” for a type. Read more
Source§impl Display for GatewayApiError
impl Display for GatewayApiError
Source§impl<D> Error for GatewayApiError<D>
impl<D> Error for GatewayApiError<D>
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<CommonApiError> for GatewayApiError
impl From<CommonApiError> for GatewayApiError
Source§fn from(common_error: CommonApiError) -> GatewayApiError
fn from(common_error: CommonApiError) -> GatewayApiError
Converts to this type from the input type.
Source§impl From<ErrorResponse> for GatewayApiError
impl From<ErrorResponse> for GatewayApiError
Source§fn from(err_resp: ErrorResponse) -> GatewayApiError
fn from(err_resp: ErrorResponse) -> GatewayApiError
Converts to this type from the input type.
Source§impl From<GatewayApiError> for ErrorResponse
impl From<GatewayApiError> for ErrorResponse
Source§fn from(api_error: GatewayApiError) -> ErrorResponse
fn from(api_error: GatewayApiError) -> ErrorResponse
Converts to this type from the input type.
Source§impl IntoResponse for GatewayApiError
Available on crate feature axum only.
impl IntoResponse for GatewayApiError
Available on crate feature
axum only.Source§fn into_response(self) -> Response<Body>
fn into_response(self) -> Response<Body>
Create a response.
Source§impl<D> PartialEq for GatewayApiError<D>where
D: PartialEq,
impl<D> PartialEq for GatewayApiError<D>where
D: PartialEq,
Source§impl ToHttpStatus for GatewayApiError
impl ToHttpStatus for GatewayApiError
fn to_http_status(&self) -> StatusCode
impl<D> Eq for GatewayApiError<D>where
D: Eq,
impl<D> StructuralPartialEq for GatewayApiError<D>
Auto Trait Implementations§
impl<D> Freeze for GatewayApiError<D>where
D: Freeze,
impl<D> RefUnwindSafe for GatewayApiError<D>where
D: RefUnwindSafe,
impl<D> Send for GatewayApiError<D>where
D: Send,
impl<D> Sync for GatewayApiError<D>where
D: Sync,
impl<D> Unpin for GatewayApiError<D>where
D: Unpin,
impl<D> UnsafeUnpin for GatewayApiError<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for GatewayApiError<D>where
D: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T, S> Handler<IntoResponseHandler, S> for T
impl<T, S> Handler<IntoResponseHandler, S> for T
Source§fn call(
self,
_req: Request<Body>,
_state: S,
) -> <T as Handler<IntoResponseHandler, S>>::Future
fn call( self, _req: Request<Body>, _state: S, ) -> <T as Handler<IntoResponseHandler, S>>::Future
Call the handler with the given request.
Source§fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S>where
L: Layer<HandlerService<Self, T, S>> + Clone,
<L as Layer<HandlerService<Self, T, S>>>::Service: Service<Request<Body>>,
Apply a
tower::Layer to the handler. Read moreSource§fn with_state(self, state: S) -> HandlerService<Self, T, S>
fn with_state(self, state: S) -> HandlerService<Self, T, S>
Convert the handler into a
Service by providing the stateSource§impl<H, T> HandlerWithoutStateExt<T> for H
impl<H, T> HandlerWithoutStateExt<T> for H
Source§fn into_service(self) -> HandlerService<H, T, ()>
fn into_service(self) -> HandlerService<H, T, ()>
Convert the handler into a
Service and no state.Source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, ()>>
Convert the handler into a
MakeService and no state. Read moreSource§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.