pub struct ScrapeConfig {
pub timeout: u64,
pub max_body_bytes: usize,
pub allowed_domains: Vec<String>,
pub denied_domains: Vec<String>,
}Expand description
Configuration for the web scrape tool.
Fields§
§timeout: u64§max_body_bytes: usize§allowed_domains: Vec<String>Domain allowlist. Empty = all public domains allowed (default, existing behavior).
When non-empty, ONLY URLs whose host matches an entry are permitted (deny-unknown).
Supports exact match ("docs.rs") and wildcard prefix ("*.rust-lang.org").
Wildcard * matches a single subdomain segment only.
Operators SHOULD set an explicit allowlist in production deployments.
Empty allowlist with a non-empty denied_domains is a denylist-only configuration
which is NOT a security boundary — an attacker can use any domain not on the list.
denied_domains: Vec<String>Domain denylist. Always enforced, regardless of allowlist state.
Supports the same pattern syntax as allowed_domains.
Trait Implementations§
Source§impl Debug for ScrapeConfig
impl Debug for ScrapeConfig
Source§impl Default for ScrapeConfig
impl Default for ScrapeConfig
Source§impl<'de> Deserialize<'de> for ScrapeConfig
impl<'de> Deserialize<'de> for ScrapeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ScrapeConfig
impl RefUnwindSafe for ScrapeConfig
impl Send for ScrapeConfig
impl Sync for ScrapeConfig
impl Unpin for ScrapeConfig
impl UnsafeUnpin for ScrapeConfig
impl UnwindSafe for ScrapeConfig
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