pub enum OpenApiError {
Json(Error),
Silent(SilentError),
OpenApiGeneration(String),
SwaggerUi(String),
Http(Error),
PathMismatch {
path: String,
},
ResourceNotFound {
resource: String,
},
Configuration {
message: String,
},
}Expand description
Silent OpenAPI操作相关的错误类型
Variants§
Json(Error)
JSON序列化/反序列化错误
Silent(SilentError)
Silent框架错误
OpenApiGeneration(String)
OpenAPI文档生成错误
SwaggerUi(String)
Swagger UI资源错误
Http(Error)
HTTP错误
PathMismatch
路径匹配错误
ResourceNotFound
资源未找到
Configuration
配置错误
Implementations§
Source§impl OpenApiError
impl OpenApiError
Sourcepub fn openapi_generation<S: Into<String>>(message: S) -> Self
pub fn openapi_generation<S: Into<String>>(message: S) -> Self
创建OpenAPI文档生成错误
Sourcepub fn swagger_ui<S: Into<String>>(message: S) -> Self
pub fn swagger_ui<S: Into<String>>(message: S) -> Self
创建Swagger UI错误
Sourcepub fn configuration<S: Into<String>>(message: S) -> Self
pub fn configuration<S: Into<String>>(message: S) -> Self
创建配置错误
Sourcepub fn resource_not_found<S: Into<String>>(resource: S) -> Self
pub fn resource_not_found<S: Into<String>>(resource: S) -> Self
创建资源未找到错误
Trait Implementations§
Source§impl Debug for OpenApiError
impl Debug for OpenApiError
Source§impl Display for OpenApiError
impl Display for OpenApiError
Source§impl Error for OpenApiError
impl Error for OpenApiError
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 OpenApiError
impl From<Error> for OpenApiError
Source§impl From<Error> for OpenApiError
impl From<Error> for OpenApiError
Source§impl From<OpenApiError> for Response
impl From<OpenApiError> for Response
Source§fn from(error: OpenApiError) -> Self
fn from(error: OpenApiError) -> Self
Converts to this type from the input type.
Source§impl From<SilentError> for OpenApiError
impl From<SilentError> for OpenApiError
Source§fn from(source: SilentError) -> Self
fn from(source: SilentError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OpenApiError
impl !RefUnwindSafe for OpenApiError
impl Send for OpenApiError
impl Sync for OpenApiError
impl Unpin for OpenApiError
impl !UnwindSafe for OpenApiError
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