pub struct BlockBotLayer { /* private fields */ }Available on crate features
tower and uautil only.Expand description
拦截机器人的 tower 中间件: 命中时返回 403 纯文本, 默认文案 Bot access denied。
use rust_web_utils::uautil::BlockBotLayer;
// 前台页面放行搜索引擎; 后台 / 内部接口传 false
let layer = BlockBotLayer::new(true).message("Bot access denied");Implementations§
Trait Implementations§
Source§impl Clone for BlockBotLayer
impl Clone for BlockBotLayer
Source§impl Debug for BlockBotLayer
impl Debug for BlockBotLayer
Auto Trait Implementations§
impl Forget for BlockBotLayer
impl Freeze for BlockBotLayer
impl Move for BlockBotLayer
impl RefUnwindSafe for BlockBotLayer
impl Send for BlockBotLayer
impl Sync for BlockBotLayer
impl Unpin for BlockBotLayer
impl UnsafeUnpin for BlockBotLayer
impl UnwindSafe for BlockBotLayer
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