[][src]Struct elasticsearch::http::transport::Transport

pub struct Transport { /* fields omitted */ }

A HTTP transport responsible for making the API requests to Elasticsearch, using a Connection selected from a ConnectionPool

Methods

impl Transport[src]

pub fn single_node(url: &str) -> Result<Transport, Error>[src]

Creates a new instance of a Transport configured with a SingleNodeConnectionPool.

pub fn cloud(
    cloud_id: &str,
    credentials: Credentials
) -> Result<Transport, Error>
[src]

Creates a new instance of a Transport configured for use with Elasticsearch service in Elastic Cloud.

  • cloud_id: The Elastic Cloud Id retrieved from the cloud web console, that uniquely identifies the deployment instance.
  • credentials: A set of credentials the client should use to authenticate to Elasticsearch service.

pub async fn send<'_, '_, '_, B, Q: ?Sized>(
    &'_ self,
    method: Method,
    path: &'_ str,
    headers: HeaderMap,
    query_string: Option<&'_ Q>,
    body: Option<B>
) -> Result<Response, Error> where
    B: Body,
    Q: Serialize
[src]

Creates an asynchronous request that can be awaited

Trait Implementations

impl Clone for Transport[src]

impl Debug for Transport[src]

impl Default for Transport[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.