yeshenyue2017/web-discovery-kit/robots does not have a README file
pub(all) struct RobotsDiagnostic {
code : RobotsDiagnosticCode
group_index : Int?
line : Int?
subject : String
message : String
} derive(Eq, Debug)pub(all) struct RobotsPolicyInspection {
diagnostics : Array[RobotsDiagnostic]
sitemap_urls : Array[String]
group_count : Int
rule_count : Int
actionable_rule_count : Int
} derive(Eq, Debug)fn decide(document : RobotsDocument, user_agent : String, uri : String) -> RobotsDecision raise DiscoveryErrortest {
let document = parse("Sitemap: https://example.test/map.xml\n")
assert_eq(extract_sitemap_urls(document), ["https://example.test/map.xml"])
}test {
let document = parse("User-agent: bot\nDisallow: \n")
let inspection = inspect_policy(document)
assert_eq(inspection.actionable_rule_count, 0)
assert_eq(inspection.diagnostics[0].code, IgnoredEmptyRule)
}Install
Download zipOffline RFC 9309 robots policy and Sitemap protocol toolkit with streaming XML and consistency audits.