pub struct AdapterBuilder<S, D, E, I> { /* private fields */ }Expand description
A builder for Adapter. Call Adapter::builder() to get an instance.
Implementations§
Source§impl<S, D, E, I> AdapterBuilder<S, D, E, I>
impl<S, D, E, I> AdapterBuilder<S, D, E, I>
Sourcepub fn base_url(self, url: Url) -> Self
pub fn base_url(self, url: Url) -> Self
Set the base URL that the adapter will use for all requests.
If a base URL is not provided, then all service method URLs are assumed to be absolute.
Sourcepub fn client(self, client: Client) -> Self
pub fn client(self, client: Client) -> Self
Set a hyper::Client instance to use with the adapter.
If not supplied, a default instance will be constructed.
Sourcepub fn executor<E_>(self, executor: E_) -> AdapterBuilder<S, D, E_, I>where
E: Executor,
pub fn executor<E_>(self, executor: E_) -> AdapterBuilder<S, D, E_, I>where
E: Executor,
Set a new executor for the adapter.
Sourcepub fn interceptor<I_>(self, interceptor: I_) -> AdapterBuilder<S, D, E, I_>where
I_: Interceptor,
pub fn interceptor<I_>(self, interceptor: I_) -> AdapterBuilder<S, D, E, I_>where
I_: Interceptor,
Set a new interceptor for the adapter.
Sourcepub fn chain_interceptor<I_>(
self,
next: I_,
) -> AdapterBuilder<S, D, E, Chain<I, I_>>where
I: Interceptor,
I_: Interceptor,
pub fn chain_interceptor<I_>(
self,
next: I_,
) -> AdapterBuilder<S, D, E, Chain<I, I_>>where
I: Interceptor,
I_: Interceptor,
Chain a new interceptor with the current one. They will be called in-order.
Sourcepub fn serializer<S_>(self, serialize: S_) -> AdapterBuilder<S_, D, E, I>where
S_: Serializer,
pub fn serializer<S_>(self, serialize: S_) -> AdapterBuilder<S_, D, E, I>where
S_: Serializer,
Set a new Serializer impl for the adapter.
Sourcepub fn deserializer<D_>(self, deserialize: D_) -> AdapterBuilder<S, D_, E, I>where
D_: Deserializer,
pub fn deserializer<D_>(self, deserialize: D_) -> AdapterBuilder<S, D_, E, I>where
D_: Deserializer,
Set a new Deserializer impl for the adapter.
Source§impl<S, D, E, I> AdapterBuilder<S, D, E, I>
impl<S, D, E, I> AdapterBuilder<S, D, E, I>
Sourcepub fn serialize_json(self) -> AdapterBuilder<Serializer, Deserializer, E, I>
pub fn serialize_json(self) -> AdapterBuilder<Serializer, Deserializer, E, I>
Convenience method for using JSON serialization.
Enabled with either the rust-serialize feature or the serde-json feature.
Source§impl<S, D, E, I> AdapterBuilder<S, D, E, I>
impl<S, D, E, I> AdapterBuilder<S, D, E, I>
Auto Trait Implementations§
impl<S, D, E, I> Freeze for AdapterBuilder<S, D, E, I>
impl<S, D, E, I> !RefUnwindSafe for AdapterBuilder<S, D, E, I>
impl<S, D, E, I> Send for AdapterBuilder<S, D, E, I>
impl<S, D, E, I> Sync for AdapterBuilder<S, D, E, I>
impl<S, D, E, I> Unpin for AdapterBuilder<S, D, E, I>
impl<S, D, E, I> !UnwindSafe for AdapterBuilder<S, D, E, I>
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