pub struct ApigateError { /* private fields */ }Implementations§
Source§impl ApigateError
impl ApigateError
pub fn new(status: StatusCode, message: impl Into<Cow<'static, str>>) -> Self
pub fn bad_request(message: impl Into<Cow<'static, str>>) -> Self
pub fn forbidden(message: impl Into<Cow<'static, str>>) -> Self
pub fn payload_too_large(message: impl Into<Cow<'static, str>>) -> Self
pub fn unsupported_media_type(message: impl Into<Cow<'static, str>>) -> Self
pub fn bad_gateway(message: impl Into<Cow<'static, str>>) -> Self
pub fn gateway_timeout(message: impl Into<Cow<'static, str>>) -> Self
pub fn internal(message: impl Into<Cow<'static, str>>) -> Self
Sourcepub fn from_response(response: impl IntoResponse) -> Self
pub fn from_response(response: impl IntoResponse) -> Self
Stores a fully custom HTTP response. Useful for domain-specific JSON error payloads.
Sourcepub fn json<T>(status: StatusCode, body: T) -> Selfwhere
Json<T>: IntoResponse,
pub fn json<T>(status: StatusCode, body: T) -> Selfwhere
Json<T>: IntoResponse,
Stores a JSON response with a custom HTTP status.
pub fn bad_request_json<T>(body: T) -> Selfwhere
Json<T>: IntoResponse,
pub fn forbidden_json<T>(body: T) -> Selfwhere
Json<T>: IntoResponse,
Trait Implementations§
Source§impl Debug for ApigateError
impl Debug for ApigateError
Source§impl From<ApigateCoreError> for ApigateError
impl From<ApigateCoreError> for ApigateError
Source§fn from(value: ApigateCoreError) -> Self
fn from(value: ApigateCoreError) -> Self
Converts to this type from the input type.
Source§impl From<ApigateFrameworkError> for ApigateError
impl From<ApigateFrameworkError> for ApigateError
Source§fn from(value: ApigateFrameworkError) -> Self
fn from(value: ApigateFrameworkError) -> Self
Converts to this type from the input type.
Source§impl From<ApigatePipelineError> for ApigateError
impl From<ApigatePipelineError> for ApigateError
Source§fn from(value: ApigatePipelineError) -> Self
fn from(value: ApigatePipelineError) -> Self
Converts to this type from the input type.
Source§impl IntoResponse for ApigateError
impl IntoResponse for ApigateError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for ApigateError
impl !RefUnwindSafe for ApigateError
impl Send for ApigateError
impl !Sync for ApigateError
impl Unpin for ApigateError
impl UnsafeUnpin for ApigateError
impl !UnwindSafe for ApigateError
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