pub struct SdkConfigBuilder {
api_key: Option<String>,
base_url: Option<String>,
timeout: Option<Duration>,
max_concurrent_requests: Option<usize>,
default_headers: HashMap<String, String>,
user_agent: Option<String>,
enable_logging: bool,
}
Expand description
Builder for creating SDK configurations
Fields§
§api_key: Option<String>
§base_url: Option<String>
§timeout: Option<Duration>
§max_concurrent_requests: Option<usize>
§default_headers: HashMap<String, String>
§user_agent: Option<String>
§enable_logging: bool
Implementations§
Source§impl SdkConfigBuilder
impl SdkConfigBuilder
Sourcepub fn max_concurrent(self, max_concurrent: usize) -> Self
pub fn max_concurrent(self, max_concurrent: usize) -> Self
Sets the maximum concurrent requests
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 user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Sets the user agent
Sourcepub fn enable_logging(self) -> Self
pub fn enable_logging(self) -> Self
Enables logging
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SdkConfigBuilder
impl RefUnwindSafe for SdkConfigBuilder
impl Send for SdkConfigBuilder
impl Sync for SdkConfigBuilder
impl Unpin for SdkConfigBuilder
impl UnwindSafe for SdkConfigBuilder
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