Struct anterofit::Adapter
[−]
[src]
pub struct Adapter<E, I: ?Sized, S, D> { /* fields omitted */ }
The starting point of all Anterofit requests.
Use builder()
to start constructing an instance.
Methods
impl<E: Clone, I: Interceptor, S, D> Adapter<E, I, S, D>
[src]
fn erase(self) -> Adapter<E, Interceptor, S, D>
Type-erase the adaptor's Interceptor
.
Useful for when you want to be able to name the Adapter
type
but you're using a closure or a long interceptor chain.
With the nightly
feature, unsizing coercion is implemented, so you don't need
to call this method explicitly to get this effect.
impl Adapter<DefaultExecutor, NoIntercept, NoSerializer, FromStrDeserializer>
[src]
fn builder()
-> AdapterBuilder<DefaultExecutor, NoIntercept, NoSerializer, FromStrDeserializer>
-> AdapterBuilder<DefaultExecutor, NoIntercept, NoSerializer, FromStrDeserializer>
Start building an impl of Adapter
using the default inner types.
Trait Implementations
impl<E: Debug, I: Debug + ?Sized, S: Debug, D: Debug> Debug for Adapter<E, I, S, D>
[src]
impl<E: Clone, I: ?Sized, S, D> Clone for Adapter<E, I, S, D>
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<E, I: ?Sized, S, D> AbsAdapter for Adapter<E, I, S, D> where E: Executor,
I: Interceptor,
S: Serializer,
D: Deserializer
[src]
I: Interceptor,
S: Serializer,
D: Deserializer
type Serializer = S
The adapter's serializer type.
type Deserializer = D
The adapter's deserializer type.
fn serializer(&self) -> &S
Get a reference to the adapter's Serializer
.
fn deserializer(&self) -> &D
Get a reference to the adapter's Deserializer
.
impl<E, I: ?Sized, S, D> ObjSafeAdapter for Adapter<E, I, S, D> where E: Executor,
I: Interceptor,
S: Serializer,
D: Deserializer
[src]
I: Interceptor,
S: Serializer,
D: Deserializer
fn execute(&self, exec: Box<ExecBox>)
Execute exec
on this adapter's executor.
fn intercept(&self, head: &mut RequestHead)
Pass head
to this adapter's interceptor for modification.
fn request_builder(&self, head: &RequestHead) -> Result<NetRequestBuilder>
Initialize a hyper::client::RequestBuilder
from head
.