pub struct FigshareClientBuilder { /* private fields */ }Expand description
Builder for configuring a FigshareClient.
Implementations§
Sourcepub fn endpoint(self, endpoint: Endpoint) -> Self
pub fn endpoint(self, endpoint: Endpoint) -> Self
Overrides the API endpoint used by the client.
Sourcepub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Overrides the User-Agent header sent on each request.
Sourcepub fn request_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
Sets the overall HTTP request timeout used by the underlying client.
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Sets the TCP connect timeout used by the underlying client.
Sourcepub fn poll_options(self, poll: PollOptions) -> Self
pub fn poll_options(self, poll: PollOptions) -> Self
Overrides the polling policy used by upload and publish helpers.
Sourcepub fn build(self) -> Result<FigshareClient, FigshareError>
pub fn build(self) -> Result<FigshareClient, FigshareError>
Builds a configured FigshareClient.
§Errors
Returns an error if the underlying reqwest client cannot be built.
Trait Implementations§
Source§fn clone(&self) -> FigshareClientBuilder
fn clone(&self) -> FigshareClientBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
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