pub struct Context { /* private fields */ }
Expand description
包含了每次请求的所有信息以及用户自定义信息
Implementations§
Source§impl Context
impl Context
Source§impl Context
impl Context
Sourcepub fn skip_before_filters(&mut self)
pub fn skip_before_filters(&mut self)
在前置过滤器中调用才有效,调用后会跳过后面的所有前置过滤器
Sourcepub fn is_skip_before_filters(&self) -> bool
pub fn is_skip_before_filters(&self) -> bool
判断是否要跳过剩下的前置过滤器
Sourcepub fn skip_after_filters(&mut self)
pub fn skip_after_filters(&mut self)
调用后会跳过后面的所有后置过滤器,在请求处理函数和后置过滤器中调用才有效
Sourcepub fn is_skip_after_filters(&self) -> bool
pub fn is_skip_after_filters(&self) -> bool
判断是否要跳过剩下的后置过滤器
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
是否处理完毕
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
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