pub struct StandardError {
pub err_code: String,
pub status_code: StatusCode,
pub message: String,
/* private fields */
}
Fields§
§err_code: String
§status_code: StatusCode
§message: String
Implementations§
Source§impl StandardError
impl StandardError
pub fn load_error_messages() -> Result<StandardErrorMessages, Box<dyn Error>>
Trait Implementations§
Source§impl Clone for StandardError
impl Clone for StandardError
Source§fn clone(&self) -> StandardError
fn clone(&self) -> StandardError
Returns a copy 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 Debug for StandardError
impl Debug for StandardError
Source§impl Display for StandardError
impl Display for StandardError
Source§impl Error for StandardError
impl Error for StandardError
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<Error> for StandardError
impl From<Error> for StandardError
Source§fn from(err: SerdeError) -> Self
fn from(err: SerdeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for StandardError
impl From<Error> for StandardError
Source§fn from(err: SerdeJsonError) -> Self
fn from(err: SerdeJsonError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for StandardError
impl From<Error> for StandardError
Source§fn from(err: SerdeYamlError) -> Self
fn from(err: SerdeYamlError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for StandardError
impl From<Error> for StandardError
Source§impl From<Error> for StandardError
impl From<Error> for StandardError
Source§impl From<Error> for StandardError
impl From<Error> for StandardError
Source§impl From<InvalidHeaderName> for StandardError
impl From<InvalidHeaderName> for StandardError
Source§fn from(error: InvalidHeaderName) -> Self
fn from(error: InvalidHeaderName) -> Self
Converts to this type from the input type.
Source§impl From<InvalidHeaderValue> for StandardError
impl From<InvalidHeaderValue> for StandardError
Source§fn from(error: InvalidHeaderValue) -> Self
fn from(error: InvalidHeaderValue) -> Self
Converts to this type from the input type.
Source§impl From<StatusCode> for StandardError
impl From<StatusCode> for StandardError
Source§fn from(status: StatusCode) -> Self
fn from(status: StatusCode) -> Self
Converts to this type from the input type.
Source§impl Interpolate for StandardError
impl Interpolate for StandardError
fn interpolate_values(&mut self, values: HashMap<String, String>) -> Self
fn interpolate_err(&mut self, e: String) -> Self
Source§impl IntoResponse for StandardError
impl IntoResponse for StandardError
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Source§impl Status for StandardError
impl Status for StandardError
fn code(&mut self, code: StatusCode) -> Self
Auto Trait Implementations§
impl Freeze for StandardError
impl RefUnwindSafe for StandardError
impl Send for StandardError
impl Sync for StandardError
impl Unpin for StandardError
impl UnwindSafe for StandardError
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<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§fn into_make_service_with_connect_info<C>(
self,
) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
fn into_make_service_with_connect_info<C>( self, ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>
Convert the handler into a
MakeService
which stores information
about the incoming connection and has no state. Read more