pub struct ClientBuilder { /* private fields */ }
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
pub fn new(base_url: Url, http_client: Client) -> Self
Sourcepub fn with<M>(self, middleware: M) -> Selfwhere
M: Middleware,
pub fn with<M>(self, middleware: M) -> Selfwhere
M: Middleware,
Add middleware to the client that will be called on each request. Middlewares are invoked in the order they are added as part of the request cycle.
pub fn build(self) -> Result<Client>
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
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