robotparser-fork 0.11.0

robots.txt parser for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pub struct Directive<'a> {
    key: &'a str,
    value: &'a str,
}

impl<'a> Directive<'a> {
    pub fn new(key: &'a str, value: &'a str) -> Directive<'a> {
        Directive { key, value }
    }

    pub fn get_key_lowercase(&self) -> String {
        self.key.to_lowercase()
    }

    pub fn get_value(&self) -> &str {
        self.value
    }
}