pub struct Rule {
pub status: StatusCode,
pub target: String,
pub rewrite_status: Option<StatusCode>,
}Expand description
一条错误页规则。
Fields§
§status: StatusCode命中的状态码
target: String内部目标路径(/50x.html);必须是进程内路径,不接受绝对 URL
rewrite_status: Option<StatusCode>是否把状态码也换成目标的状态(Nginx 的 =200 写法)。默认 false。
Trait Implementations§
Auto Trait Implementations§
impl Forget for Rule
impl Freeze for Rule
impl Move for Rule
impl RefUnwindSafe for Rule
impl Send for Rulewhere
RawVecInner: Send,
impl Sync for Rulewhere
RawVecInner: Sync,
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rulewhere
RawVecInner: UnwindSafe,
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