pub struct SerperHttpClientBuilder {
api_key: Option<ApiKey>,
base_url: Option<BaseUrl>,
transport_config: TransportConfig,
}
Expand description
Builder for creating HTTP clients with custom configuration
Fields§
§api_key: Option<ApiKey>
§base_url: Option<BaseUrl>
§transport_config: TransportConfig
Implementations§
Source§impl SerperHttpClientBuilder
impl SerperHttpClientBuilder
Sourcepub fn transport_config(self, config: TransportConfig) -> Self
pub fn transport_config(self, config: TransportConfig) -> Self
Sets the transport configuration
Sourcepub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, key: impl Into<String>, value: impl Into<String>) -> Self
Adds a default header
Sourcepub fn build(self) -> Result<SerperHttpClient>
pub fn build(self) -> Result<SerperHttpClient>
Builds the HTTP client
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SerperHttpClientBuilder
impl RefUnwindSafe for SerperHttpClientBuilder
impl Send for SerperHttpClientBuilder
impl Sync for SerperHttpClientBuilder
impl Unpin for SerperHttpClientBuilder
impl UnwindSafe for SerperHttpClientBuilder
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