Trait anterofit::net::ObjSafeAdapter
[−]
[src]
pub trait ObjSafeAdapter: Send + 'static { fn intercept(&self, head: &mut RequestHead); fn execute(&self, exec: Box<ExecBox>); fn request_builder(&self, head: &RequestHead) -> Result<NetRequestBuilder>; }
Object-safe subset of the adapter API.
Required Methods
fn intercept(&self, head: &mut RequestHead)
Pass head
to this adapter's interceptor for modification.
fn execute(&self, exec: Box<ExecBox>)
Execute exec
on this adapter's executor.
fn request_builder(&self, head: &RequestHead) -> Result<NetRequestBuilder>
Initialize a hyper::client::RequestBuilder
from head
.
Implementors
impl<E, I: ?Sized, S, D> ObjSafeAdapter for Adapter<E, I, S, D> where E: Executor,
I: Interceptor,
S: Serializer,
D: Deserializer