adstxt 0.1.1

This library provides a parser for ads.txt.
Documentation
  • Coverage
  • 56.67%
    17 out of 30 items documented0 out of 0 items with examples
  • Size
  • Source code size: 35.39 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.67 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • mechiru/adstxt
    2 0 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mechiru

adstxt

ci Rust Documentation Latest Version

This library provides a parser for ads.txt v1.0.2.

Example

# use adstxt::*;

assert_eq!(
    AdsTxt::parse(
        "# comment
placeholder.example.com, placeholder, DIRECT, placeholder # Comment
contact=adops@example.com

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: "adops@example.com" }, None)],
    }
);

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.