pub enum BootError {
Show 31 variants
EmptyModuleName,
InvalidRoutePath(String),
InvalidHostPattern(String),
DuplicateRoute(String),
NotFound(String),
MethodNotAllowed(String),
DuplicateProvider(String),
MissingProvider(String),
ProviderTypeMismatch(String),
HttpException {
status: u16,
message: String,
},
Forbidden(String),
Unauthorized(String),
BadRequest(String),
RequestTimeout(String),
Conflict(String),
Gone(String),
PreconditionFailed(String),
PayloadTooLarge(String),
UnsupportedMediaType(String),
NotAcceptable(String),
ImATeapot(String),
UnprocessableEntity(String),
TooManyRequests(String),
InternalServerError(String),
NotImplemented(String),
BadGateway(String),
ServiceUnavailable(String),
GatewayTimeout(String),
Adapter(String),
Internal(String),
Io(Error),
}Expand description
Errors returned while building or serving a Boot application.
Variants§
EmptyModuleName
InvalidRoutePath(String)
InvalidHostPattern(String)
DuplicateRoute(String)
NotFound(String)
MethodNotAllowed(String)
DuplicateProvider(String)
MissingProvider(String)
ProviderTypeMismatch(String)
HttpException
Forbidden(String)
BadRequest(String)
RequestTimeout(String)
Conflict(String)
Gone(String)
PreconditionFailed(String)
PayloadTooLarge(String)
UnsupportedMediaType(String)
NotAcceptable(String)
ImATeapot(String)
UnprocessableEntity(String)
TooManyRequests(String)
InternalServerError(String)
NotImplemented(String)
BadGateway(String)
GatewayTimeout(String)
Adapter(String)
Internal(String)
Io(Error)
Implementations§
Source§impl BootError
impl BootError
Sourcepub fn kind(&self) -> BootErrorKind
pub fn kind(&self) -> BootErrorKind
Stable category for this error.
Sourcepub fn http_status_code(&self) -> u16
pub fn http_status_code(&self) -> u16
HTTP status code that adapters should use for this error.
Sourcepub fn http_response_message(&self) -> String
pub fn http_response_message(&self) -> String
Text response body that adapters should use for this error.
pub fn http_exception(status: u16, message: impl Into<String>) -> Result<Self>
pub fn from_http_status(status: u16, message: impl Into<String>) -> Self
pub fn not_found(message: impl Into<String>) -> Self
pub fn method_not_allowed(message: impl Into<String>) -> Self
pub fn forbidden(message: impl Into<String>) -> Self
pub fn bad_request(message: impl Into<String>) -> Self
pub fn request_timeout(message: impl Into<String>) -> Self
pub fn conflict(message: impl Into<String>) -> Self
pub fn gone(message: impl Into<String>) -> Self
pub fn precondition_failed(message: impl Into<String>) -> Self
pub fn payload_too_large(message: impl Into<String>) -> Self
pub fn unsupported_media_type(message: impl Into<String>) -> Self
pub fn not_acceptable(message: impl Into<String>) -> Self
pub fn im_a_teapot(message: impl Into<String>) -> Self
pub fn unprocessable_entity(message: impl Into<String>) -> Self
pub fn too_many_requests(message: impl Into<String>) -> Self
pub fn internal_server_error(message: impl Into<String>) -> Self
pub fn not_implemented(message: impl Into<String>) -> Self
pub fn bad_gateway(message: impl Into<String>) -> Self
pub fn gateway_timeout(message: impl Into<String>) -> Self
pub fn internal(message: impl Into<String>) -> Self
Trait Implementations§
Source§impl Error for BootError
impl Error for BootError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for BootError
impl !UnwindSafe for BootError
impl Freeze for BootError
impl Send for BootError
impl Sync for BootError
impl Unpin for BootError
impl UnsafeUnpin for BootError
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