pub struct FetcherConfig {
pub user_agent: String,
pub timeout: Duration,
pub headers: Option<HeaderMap>,
pub redirect_policy: Option<Policy>,
}
Expand description
Creates a fetcher with Twitter-specific configurations.
§Examples
ⓘ
let fetcher = Fetcher::new();
// Using Twitter-specific configuration
let twitter_fetcher = Fetcher::new_twitter_client();
// Using custom configuration
let custom_fetcher = Fetcher::new_with_config(FetcherConfig {
user_agent: "my-custom-agent/1.0".to_string(),
timeout: Duration::from_secs(20),
headers: Some(my_custom_headers),
redirect_policy: Some(my_redirect_policy),
});
Fields§
§user_agent: String
§timeout: Duration
§headers: Option<HeaderMap>
§redirect_policy: Option<Policy>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FetcherConfig
impl !RefUnwindSafe for FetcherConfig
impl Send for FetcherConfig
impl Sync for FetcherConfig
impl Unpin for FetcherConfig
impl !UnwindSafe for FetcherConfig
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