pub mod error;
pub mod limit;
pub mod lookup;
pub mod tld;
pub use error::{Error, ErrorId, ExitClass, Result};
pub use limit::{
BreakerState, CAUTIOUS_LIMIT, HostLimit, Pacer, PacingLimits, PausedHost, Refusal,
};
pub use lookup::{
Attempt, AttemptOutcome, BOOTSTRAP_URL, Delegation, Engine, Finding, Freshness, Reason,
Registration, Server, Servers, ServiceMap, Settings, Source, SourcePolicy, Status, Tally,
reorders_text, shapes_letters,
};
pub use tld::{
CATALOG_VERSION, Catalog, Depth, Extension, ExtensionKind, Family, Filter, Group, LengthRule,
MAX_INPUT_BYTES, NormalizedName, Page, Selector, Sort, SortDirection, SortKey, Suffix,
SweepPlan, normalize_name, parse_name,
};
pub const VERSION: &str = env!("CARGO_PKG_VERSION");
#[must_use]
pub fn user_agent() -> String {
format!("reserve/{VERSION} (+https://reserve.devops.bd)")
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn the_user_agent_names_the_tool_and_its_version() {
let agent = user_agent();
assert!(agent.starts_with("reserve/"));
assert!(agent.contains(VERSION));
}
}