Struct anterofit::AdapterBuilder [−][src]
pub struct AdapterBuilder<S, D, E, I> { /* fields omitted */ }
A builder for Adapter
. Call Adapter::builder()
to get an instance.
Methods
impl<S, D, E, I> AdapterBuilder<S, D, E, I>
[src]
impl<S, D, E, I> AdapterBuilder<S, D, E, I>
pub fn base_url(self, url: Url) -> Self
[src]
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.
pub fn client(self, client: Client) -> Self
[src]
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.
pub fn executor<E_>(self, executor: E_) -> AdapterBuilder<S, D, E_, I> where
E: Executor,
[src]
pub fn executor<E_>(self, executor: E_) -> AdapterBuilder<S, D, E_, I> where
E: Executor,
Set a new executor for the adapter.
pub fn interceptor<I_>(self, interceptor: I_) -> AdapterBuilder<S, D, E, I_> where
I_: Interceptor,
[src]
pub fn interceptor<I_>(self, interceptor: I_) -> AdapterBuilder<S, D, E, I_> where
I_: Interceptor,
Set a new interceptor for the adapter.
pub fn chain_interceptor<I_>(
self,
next: I_
) -> AdapterBuilder<S, D, E, Chain<I, I_>> where
I: Interceptor,
I_: Interceptor,
[src]
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.
pub fn serializer<S_>(self, serialize: S_) -> AdapterBuilder<S_, D, E, I> where
S_: Serializer,
[src]
pub fn serializer<S_>(self, serialize: S_) -> AdapterBuilder<S_, D, E, I> where
S_: Serializer,
Set a new Serializer
impl for the adapter.
pub fn deserializer<D_>(self, deserialize: D_) -> AdapterBuilder<S, D_, E, I> where
D_: Deserializer,
[src]
pub fn deserializer<D_>(self, deserialize: D_) -> AdapterBuilder<S, D_, E, I> where
D_: Deserializer,
Set a new Deserializer
impl for the adapter.
impl<S, D, E, I> AdapterBuilder<S, D, E, I>
[src]
impl<S, D, E, I> AdapterBuilder<S, D, E, I>
pub fn serialize_json(self) -> AdapterBuilder<Serializer, Deserializer, E, I>
[src]
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.
impl<S, D, E, I> AdapterBuilder<S, D, E, I> where
S: Serializer,
D: Deserializer,
E: Executor,
I: Interceptor,
[src]
impl<S, D, E, I> AdapterBuilder<S, D, E, I> where
S: Serializer,
D: Deserializer,
E: Executor,
I: Interceptor,
pub fn build(self) -> Adapter<S, D>
[src]
pub fn build(self) -> Adapter<S, D>
Using the supplied types, complete the adapter.
<E as Executor>::start()
will be called here.