pub struct ClientBuilder { /* private fields */ }Expand description
Builder for constructing a Client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn new(user_agent: impl Into<String>) -> Self
pub fn new(user_agent: impl Into<String>) -> Self
Creates a new builder. The user agent is required by SEC EDGAR policy.
Typically in the format "AppName/Version contact@email.com".
Sourcepub fn rate_limit(self, requests_per_second: u32) -> Self
pub fn rate_limit(self, requests_per_second: u32) -> Self
Override the default rate limit of 10 requests per second. Setting a value above 10 is not recommended per SEC fair access policy.
Sourcepub fn http_client(self, client: Client) -> Self
pub fn http_client(self, client: Client) -> Self
Provide a pre-configured reqwest::Client.
Useful for custom timeouts, proxies, or testing.
Note: the User-Agent default header on this client will be overridden.
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnsafeUnpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
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