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

pub struct TransportBuilder { /* fields omitted */ }

Builds a HTTP transport to make API calls to Elasticsearch

Methods

impl TransportBuilder[src]

pub fn new<P>(conn_pool: P) -> Self where
    P: ConnectionPool + Debug + Clone + Send + 'static, 
[src]

Creates a new instance of TransportBuilder. Accepts a ConnectionPool from which Connections to Elasticsearch will be retrieved.

pub fn proxy(
    self,
    url: Url,
    username: Option<&str>,
    password: Option<&str>
) -> Self
[src]

Configures a proxy.

An optional username and password will be used to set the Proxy-Authorization header using Basic Authentication.

pub fn disable_proxy(self) -> Self[src]

Whether to disable proxies, including system proxies.

NOTE: System proxies are enabled by default.

pub fn auth(self, credentials: Credentials) -> Self[src]

Credentials for the client to use for authentication to Elasticsearch

pub fn build(self) -> Result<Transport, BuildError>[src]

Builds a Transport to use to send API calls to Elasticsearch.

Trait Implementations

impl Default for TransportBuilder[src]

fn default() -> Self[src]

Creates a default implementation using the default implementation of SingleNodeConnectionPool.

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> From<T> for T[src]

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

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.