pub struct EdgarConfig {
pub user_agent: String,
pub rate_limit: u32,
pub timeout: Duration,
pub base_urls: EdgarUrls,
}Expand description
Configuration settings for the Edgar HTTP client.
This struct contains all the settings needed to customize how the Edgar client behaves, including network timeouts, rate limiting, and service endpoints. The default configuration is optimized for general use and SEC.gov compliance, but you can adjust these settings based on your application’s needs.
§Examples
Using defaults:
let config = EdgarConfig::default();Custom configuration:
let config = EdgarConfig::new(
"research_app/1.0 contact@university.edu",
5, // More conservative rate
Duration::from_secs(45),
None, // Use default URLs
);Fields§
§user_agent: StringUser agent string for HTTP requests (required by SEC)
rate_limit: u32Rate limit in requests per second (default: 10)
timeout: DurationHTTP request timeout duration
base_urls: EdgarUrlsBase URLs for different EDGAR services
Implementations§
Trait Implementations§
Source§impl Clone for EdgarConfig
impl Clone for EdgarConfig
Source§fn clone(&self) -> EdgarConfig
fn clone(&self) -> EdgarConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EdgarConfig
impl Debug for EdgarConfig
Auto Trait Implementations§
impl Freeze for EdgarConfig
impl RefUnwindSafe for EdgarConfig
impl Send for EdgarConfig
impl Sync for EdgarConfig
impl Unpin for EdgarConfig
impl UnwindSafe for EdgarConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)