pub struct NotFoundConfig {
pub enabled: bool,
pub message: String,
}Expand description
404 处理配置
Fields§
§enabled: bool是否启用自定义 404 响应(返回 JSON 格式的统一错误响应)
message: String自定义 404 提示消息
Trait Implementations§
Source§impl Clone for NotFoundConfig
impl Clone for NotFoundConfig
Source§fn clone(&self) -> NotFoundConfig
fn clone(&self) -> NotFoundConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NotFoundConfig
impl Debug for NotFoundConfig
Source§impl Default for NotFoundConfig
impl Default for NotFoundConfig
Source§impl<'de> Deserialize<'de> for NotFoundConfig
impl<'de> Deserialize<'de> for NotFoundConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for NotFoundConfig
impl RefUnwindSafe for NotFoundConfig
impl Send for NotFoundConfig
impl Sync for NotFoundConfig
impl Unpin for NotFoundConfig
impl UnsafeUnpin for NotFoundConfig
impl UnwindSafe for NotFoundConfig
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