Expand description
Configuration: defaults, XDG TOML, env allowlist, CLI override.
Structs§
- Config
- Runtime configuration resolved from defaults, XDG TOML, env, and CLI.
- Config
Init Result - Result of
config init. - Config
Path Data - Path inventory for
config path(agent-readable).
Enums§
- Path
Source - Which layer won when resolving a storage path (XDG hierarchy diagnostics).
Constants§
- APP_
NAME - Product binary / crate name.
- APP_
VERSION - Package version from Cargo.
- DEFAULT_
CACHE_ TTL_ SECS - Default HTTP disk cache TTL (seconds).
- DEFAULT_
CONFIG_ TOML - Default
config.tomlbody written byconfig init(commented template). - DEFAULT_
CONNECT_ TIMEOUT_ SECS - Default TCP connect timeout (seconds).
- DEFAULT_
MAX_ BODY_ BYTES - Default maximum downloaded response body size (bytes).
- DEFAULT_
MAX_ CACHE_ BYTES - Default HTTP disk cache budget in bytes (256 MiB).
0= unlimited. - DEFAULT_
MAX_ OUTPUT_ BYTES - Default maximum emitted stdout payload size (bytes).
- DEFAULT_
MAX_ REDIRECTS - Default maximum HTTP redirects followed.
- DEFAULT_
MAX_ RETRIES - Default maximum retries for transient HTTP errors.
- DEFAULT_
PER_ PAGE - Default
per_pagefor crates.io search. - DEFAULT_
RATE_ LIMIT_ DELAY_ MS - Default minimum delay between requests to the same host (milliseconds).
- DEFAULT_
RETRY_ BASE_ MS - Base backoff delay (milliseconds) for retries.
- DEFAULT_
RETRY_ MAX_ DELAY_ MS - Default ceiling for a single retry sleep (milliseconds).
- DEFAULT_
SEARCH_ LIMIT - Default hit limit for search-in-crate.
- DEFAULT_
TIMEOUT_ SECS - Default wall-clock timeout (seconds) for one operation.
- HARD_
MAX_ BODY_ BYTES - Hard ceiling for HTTP body size (CLI / TOML / env cannot raise above this).
- HARD_
MAX_ OUTPUT_ BYTES - Hard ceiling for emitted stdout payload size (CLI / TOML / env cannot raise above).
- HOST_
CRATES_ IO - crates.io host allowlist entry.
- HOST_
DOCS_ RS - docs.rs host allowlist entry.
- HOST_
DOC_ RUST_ LANG_ ORG - Official stdlib rustdoc host (
std/core/alloc). - HOST_
STATIC_ DOCS_ RS - static.docs.rs host allowlist entry (redirects).
- MAX_
CRATE_ NAME_ CHARS - Maximum crate name length.
- MAX_
ITEM_ PATH_ CHARS - Maximum rustdoc item path length.
- MAX_
PER_ PAGE - Maximum
per_pageaccepted for crates.io search. - MAX_
QUERY_ CHARS - Maximum query string length.
- MAX_
SEARCH_ IN_ CRATE_ LIMIT - Maximum hit limit for search-in-crate.
- MAX_
USER_ AGENT_ CHARS - Maximum User-Agent length.
- MAX_
VERSION_ CHARS - Maximum version string length.
- MSRV
- Minimum supported Rust version.
- SCHEMA_
VERSION - JSON envelope
schema_versionconstant.
Functions§
- config_
path_ data - Build path inventory from a loaded
Config. - config_
toml_ under - Ensure
pathis under a directory (used by tests / path display). - default_
user_ agent - Builds the default User-Agent, optionally including a contact token.
- docs_
origin_ for_ crate - Resolve docs origin for a crate: stdlib → doc.rust-lang.org, else configured docs.rs origin.
- init_
config_ toml - Create default
config.tomlunder the resolved config directory. - is_
stdlib_ crate - True for Rust standard library crates documented on
doc.rust-lang.org. - normalize_
origin - Strip trailing slash from an origin base URL.
- resolve_
config_ dir - Resolve config directory: CLI/env override, then
DOCSRS_CLI_HOME/config, then XDG. - resolve_
config_ dir_ with_ source - Resolve config directory and report which layer won.
- resolve_
version_ arg - Resolve version argument:
latestor SemVer withoutvprefix / build metadata. - stdlib_
channel - Map CLI version token to a rustdoc channel for stdlib paths.
- validate_
crate_ name - Validate crate name (compat wrapper over
crate::domain::CrateName::parse). - validate_
item_ path - Validate item path (compat wrapper over
crate::domain::ItemPath::parse). - validate_
query - Validate search query (compat wrapper over
crate::domain::SearchQuery::parse).