2 个版本

0.1.1 2024年3月8日
0.1.0 2020年7月22日

#871解析器实现

MIT/Apache

18KB
312

adstxt

ci Rust Documentation Latest Version

此库为 ads.txt v1.0.2 提供了解析器。

示例

# use adstxt::*;

assert_eq!(
    AdsTxt::parse(
        "# comment
placeholder.example.com, placeholder, DIRECT, placeholder # Comment
[email protected]

unknown"
    ),
    AdsTxt {
        records: vec![(
            Record {
                domain: "placeholder.example.com",
                account_id: "placeholder",
                relation: Relation::Direct,
                authority_id: Some("placeholder"),
            },
            None
        )],
        variables: vec![(Variable { name: "contact", value: "[email protected]" }, None)],
    }
);

许可证

根据您的选择,此库受 Apache 许可证,版本 2.0MIT 许可证 许可。

无运行时依赖项