rpz

Response policy zone (RPZ) file generator.
git clone https://git.philomathiclife.com/repos/rpz
Log | Files | Refs | README

lib.rs (2350B)


      1 //! [![git]](https://git.philomathiclife.com/rpz/log.html) [![crates-io]](https://crates.io/crates/rpz) [![docs-rs]](crate)
      2 //!
      3 //! [git]: https://git.philomathiclife.com/git_badge.svg
      4 //! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust
      5 //! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs
      6 //!
      7 //! `rpz` is a library for the binary `rpz`.
      8 //!
      9 //! The primary module is [`mod@dom`] which contains types which can parse
     10 //! [`str`]s into different kinds of domains.
     11 //!
     12 //! [`mod@file`] contains types that can read UTF-8 files on the local file system
     13 //! or hosted on HTTP(S) servers.
     14 //!
     15 //! The purpose of these types is to make fetching, parsing, and transforming
     16 //! ad-blocking files into a [response policy zone (RPZ)](https://en.wikipedia.org/wiki/Response_policy_zone)
     17 //! file easier.
     18 #![feature(btree_cursors)]
     19 #![feature(io_error_more)]
     20 #![deny(
     21     future_incompatible,
     22     let_underscore,
     23     missing_docs,
     24     nonstandard_style,
     25     rust_2018_compatibility,
     26     rust_2018_idioms,
     27     rust_2021_compatibility,
     28     rust_2024_compatibility,
     29     unsafe_code,
     30     unused,
     31     warnings,
     32     clippy::all,
     33     clippy::cargo,
     34     clippy::complexity,
     35     clippy::correctness,
     36     clippy::nursery,
     37     clippy::pedantic,
     38     clippy::perf,
     39     clippy::restriction,
     40     clippy::style,
     41     clippy::suspicious
     42 )]
     43 #![allow(
     44     unknown_lints,
     45     reason = "OpenBSD does not recognize clippy::return_and_then"
     46 )]
     47 #![expect(
     48     clippy::arbitrary_source_item_ordering,
     49     clippy::blanket_clippy_restriction_lints,
     50     clippy::exhaustive_enums,
     51     clippy::exhaustive_structs,
     52     clippy::implicit_return,
     53     clippy::min_ident_chars,
     54     clippy::missing_trait_methods,
     55     clippy::multiple_crate_versions,
     56     clippy::question_mark_used,
     57     clippy::ref_patterns,
     58     clippy::return_and_then,
     59     clippy::single_char_lifetime_names,
     60     reason = "never want to use these lints"
     61 )]
     62 /// Module for hostname-like domains including parsing [`str`]s
     63 /// from a variety of formats.
     64 pub mod dom;
     65 /// Contains a single function, `proper_subdomain_count`, that has a lot of lines
     66 /// that were pre-generated.
     67 mod dom_count_auto_gen;
     68 /// Module for fetching and parsing local and HTTP(S) files into
     69 /// [`dom::RpzDomain`]s.
     70 pub mod file;