url_cleaner_engine/tutorial/
mod.rs

1#![allow(rustdoc::broken_intra_doc_links, reason = "It's fine.")]
2#![allow(unused_imports, reason = "They're for docs.")]
3
4//! # Tutorial
5//!
6//! A high level explanation of URL Cleaner.
7//!
8//! ## Main goal
9//!
10//! The main goal of URL Cleaner is to make advertisers, trackers, and wrongthink reporters eat shit by removing tracking garbage from URLs.
11//!
12//! If you think politics shouldn't be involved in privacy tools, you are not prepared for what's coming.
13//!
14//! If you think swearing shouldn't be in documentation, try to get my hatred across without swearing and see where that gets you.
15//!
16//! ## Terminology
17//!
18#![cfg_attr(    feature = "cache" , doc = "- A \"[job]\" is a sequence of \"[tasks](task)\", configuration like the [cleaner], [cache], etc. to use for those tasks, and optionally some [context](job_context), such as the website the tasks came from.")]
19#![cfg_attr(not(feature = "cache"), doc = "- A \"[job]\" is a sequence of \"[tasks](task)\", configuration like the [cleaner], cache, etc. to use for those tasks, and optionally some [context](job_context), such as the website the tasks came from.")]
20//!
21//! - A "[task]" is a URL to clean as well as optional [context](task_context), such as the text of the link it came from.
22//!
23//! - "Component" is a generic term for URL Cleaner Engine types like [`Action`], [`Condition`], [`StringSource`], [`UrlPart`], and so on.
24//!
25//! - Some components like [`Condition`] and [`StringMatcher`] can be "satisfied". A component is satisfied with the input to its `check` method when it returns `Ok(true)` and unsatisfied when it returns `Ok(false)`.
26//!
27//! - Some components like [`Action`] and [`StringModification`] can be "applied" to stuff. This means it takes in some value and changes that value.
28//!
29//! - Some components are said to have a "value". This refers to the return value of their main/getting method, such as [`Condition::check`], [`StringSource::get`], [`UrlPart::get`], etc..
30
31use std::collections::{HashSet, HashMap};
32
33use url::Url;
34
35pub(crate) use crate::types::*;
36pub(crate) use crate::glue::*;
37
38pub mod cleaner;
39pub(crate) use cleaner::*;
40pub mod debugging;
41pub(crate) use debugging::*;
42pub mod job;
43pub(crate) use job::*;