pub struct ErrorResponse {
pub error_message: String,
pub error_type: String,
pub stack_trace: Option<Vec<String>>,
}
Expand description
This object is used to generate requests to the Lambda Runtime APIs.
It is used for both the error response APIs and fail init calls.
custom error types should implement the RuntimeError
trait and return
this object to be compatible with the APIs.
Fields§
§error_message: String
The error message generated by the application.
error_type: String
The error type for Lambda. Normally, this value is populated using the
error_type()
method from the LambdaErrorExt
trait.
stack_trace: Option<Vec<String>>
The stack trace for the exception as vector of strings. In the framework,
this value is automatically populated using the backtrace
crate.
Trait Implementations§
Source§impl<T: AsFail + LambdaErrorExt + Display> From<T> for ErrorResponse
impl<T: AsFail + LambdaErrorExt + Display> From<T> for ErrorResponse
Auto Trait Implementations§
impl Freeze for ErrorResponse
impl RefUnwindSafe for ErrorResponse
impl Send for ErrorResponse
impl Sync for ErrorResponse
impl Unpin for ErrorResponse
impl UnwindSafe for ErrorResponse
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more