pub struct RobotsRules {
pub allowed: Vec<String>,
pub disallowed: Vec<String>,
pub crawl_delay: Option<f32>,
pub sitemaps: Vec<String>,
}Expand description
Parsed robots.txt rules.
Fields§
§allowed: Vec<String>§disallowed: Vec<String>§crawl_delay: Option<f32>§sitemaps: Vec<String>Implementations§
Source§impl RobotsRules
impl RobotsRules
Sourcepub fn is_allowed(&self, path: &str) -> bool
pub fn is_allowed(&self, path: &str) -> bool
Check if a path is allowed by the robots rules.
Trait Implementations§
Source§impl Clone for RobotsRules
impl Clone for RobotsRules
Source§fn clone(&self) -> RobotsRules
fn clone(&self) -> RobotsRules
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 moreSource§impl Debug for RobotsRules
impl Debug for RobotsRules
Source§impl Default for RobotsRules
impl Default for RobotsRules
Source§fn default() -> RobotsRules
fn default() -> RobotsRules
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RobotsRules
impl RefUnwindSafe for RobotsRules
impl Send for RobotsRules
impl Sync for RobotsRules
impl Unpin for RobotsRules
impl UnsafeUnpin for RobotsRules
impl UnwindSafe for RobotsRules
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