pub enum ServiceMatchRule {
Path(String),
PathAndMethod(String, Method),
Custom(Arc<dyn Fn(&ServiceRequest) -> bool + Send + Sync>),
}Expand description
服务请求匹配规则
Variants§
Path(String)
匹配指定路径
PathAndMethod(String, Method)
匹配路径和方法
Custom(Arc<dyn Fn(&ServiceRequest) -> bool + Send + Sync>)
自定义匹配函数
Trait Implementations§
Source§impl Clone for ServiceMatchRule
impl Clone for ServiceMatchRule
Source§fn clone(&self) -> ServiceMatchRule
fn clone(&self) -> ServiceMatchRule
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ServiceMatchRule
impl !RefUnwindSafe for ServiceMatchRule
impl Send for ServiceMatchRule
impl Sync for ServiceMatchRule
impl Unpin for ServiceMatchRule
impl UnsafeUnpin for ServiceMatchRule
impl !UnwindSafe for ServiceMatchRule
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