pub struct GmailCodeConfigBuilder { /* private fields */ }Expand description
Builder for GmailCodeConfig.
Implementations§
Source§impl GmailCodeConfigBuilder
impl GmailCodeConfigBuilder
Sourcepub fn base_url(self, value: impl Into<String>) -> Self
pub fn base_url(self, value: impl Into<String>) -> Self
Overrides the Gmail API base URL, primarily for tests.
Sourcepub fn user_id(self, value: impl Into<String>) -> Self
pub fn user_id(self, value: impl Into<String>) -> Self
Overrides the Gmail userId path segment.
Sourcepub fn user_agent(self, value: Option<impl Into<String>>) -> Self
pub fn user_agent(self, value: Option<impl Into<String>>) -> Self
Overrides or clears the HTTP user agent.
Sourcepub const fn connect_timeout(self, value: Duration) -> Self
pub const fn connect_timeout(self, value: Duration) -> Self
Sets the TCP connect timeout.
Sourcepub const fn request_timeout(self, value: Duration) -> Self
pub const fn request_timeout(self, value: Duration) -> Self
Sets the total request timeout.
Sourcepub fn build(self) -> GmailCodeResult<GmailCodeConfig>
pub fn build(self) -> GmailCodeResult<GmailCodeConfig>
Validates and returns the config.
Trait Implementations§
Source§impl Clone for GmailCodeConfigBuilder
impl Clone for GmailCodeConfigBuilder
Source§fn clone(&self) -> GmailCodeConfigBuilder
fn clone(&self) -> GmailCodeConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GmailCodeConfigBuilder
impl RefUnwindSafe for GmailCodeConfigBuilder
impl Send for GmailCodeConfigBuilder
impl Sync for GmailCodeConfigBuilder
impl Unpin for GmailCodeConfigBuilder
impl UnsafeUnpin for GmailCodeConfigBuilder
impl UnwindSafe for GmailCodeConfigBuilder
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