pub struct RobotsCache { /* private fields */ }Implementations§
Source§impl RobotsCache
impl RobotsCache
pub fn new() -> Self
Sourcepub fn parse(content: &str) -> RobotsRules
pub fn parse(content: &str) -> RobotsRules
Parse robots.txt content into rules. Handles User-agent: * only.
Sourcepub fn is_allowed(rules: &RobotsRules, path: &str) -> bool
pub fn is_allowed(rules: &RobotsRules, path: &str) -> bool
Check if path is allowed under the given rules.
Returns true (allowed) by default; explicit disallow blocks.
More-specific rules (longer prefix) win over less-specific ones.
Auto Trait Implementations§
impl !Freeze for RobotsCache
impl RefUnwindSafe for RobotsCache
impl Send for RobotsCache
impl Sync for RobotsCache
impl Unpin for RobotsCache
impl UnsafeUnpin for RobotsCache
impl UnwindSafe for RobotsCache
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