#[non_exhaustive]pub struct ResolverConfig {
pub email: String,
pub user_agent: String,
pub timeout_secs: u64,
pub sources: Vec<SourceEntry>,
pub extra_blocked_domains: Vec<String>,
pub endpoints: Endpoints,
}Expand description
Configuration for the paper resolver.
Controls which sources are queried, their priority (order in the vec), timeouts, and API identification. Callers construct this from their own config files (TOML, env vars, etc.) — paper-resolver has no file I/O dependency.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.email: StringEmail for Unpaywall/Crossref polite pool (required by their ToS).
user_agent: StringUser-Agent string for HTTP requests.
timeout_secs: u64HTTP request timeout in seconds.
sources: Vec<SourceEntry>Ordered list of sources. Position = priority (first = highest). Disabled sources are skipped.
extra_blocked_domains: Vec<String>Extra domains to treat as non-downloadable (appended to defaults).
endpoints: EndpointsBase URLs for each source — override for testing with mock servers.
Implementations§
Trait Implementations§
Source§impl Clone for ResolverConfig
impl Clone for ResolverConfig
Source§fn clone(&self) -> ResolverConfig
fn clone(&self) -> ResolverConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResolverConfig
impl Debug for ResolverConfig
Auto Trait Implementations§
impl Freeze for ResolverConfig
impl RefUnwindSafe for ResolverConfig
impl Send for ResolverConfig
impl Sync for ResolverConfig
impl Unpin for ResolverConfig
impl UnwindSafe for ResolverConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more