Trait elastic::client::Sender
[−]
[src]
pub trait Sender: Sealed + Clone { type Body; type Response; fn send<TRequest, TBody>(
&self,
req: TRequest,
params: &RequestParams
) -> Self::Response
where
TRequest: Into<HttpRequest<'static, TBody>>,
TBody: Into<Self::Body>; }
Represents a type that can send a request.
You probably don't need to touch this trait directly.
See the Client
type for making requests.
Associated Types
type Body
The kind of request body this sender accepts.
type Response
The kind of response this sender produces.
Required Methods
fn send<TRequest, TBody>(
&self,
req: TRequest,
params: &RequestParams
) -> Self::Response where
TRequest: Into<HttpRequest<'static, TBody>>,
TBody: Into<Self::Body>,
&self,
req: TRequest,
params: &RequestParams
) -> Self::Response where
TRequest: Into<HttpRequest<'static, TBody>>,
TBody: Into<Self::Body>,
Send a request.
Implementors
impl Sender for SyncSender type Body = SyncBody; type Response = Result<SyncResponseBuilder>;
impl Sender for AsyncSender type Body = AsyncBody; type Response = Pending;