[−][src]Struct elasticsearch::http::transport::TransportBuilder
Builds a HTTP transport to make API calls to Elasticsearch
Implementations
impl TransportBuilder
[src]
pub fn new<P>(conn_pool: P) -> Self where
P: ConnectionPool + Debug + Clone + Send + 'static,
[src]
P: ConnectionPool + Debug + Clone + Send + 'static,
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]
self,
url: Url,
username: Option<&str>,
password: Option<&str>
) -> Self
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 cert_validation(self, validation: CertificateValidation) -> Self
[src]
Validation applied to the certificate provided to establish a HTTPS connection. By default, full validation is applied. When using a self-signed certificate, different validation can be applied.
pub fn header(self, key: HeaderName, value: HeaderValue) -> Self
[src]
Adds a HTTP header that will be added to all client API calls.
A default HTTP header can be overridden on a per API call basis.
pub fn headers(self, headers: HeaderMap) -> Self
[src]
Adds HTTP headers that will be added to all client API calls.
Default HTTP headers can be overridden on a per API call basis.
pub fn timeout(self, timeout: Duration) -> Self
[src]
Sets a global request timeout for the client.
The timeout is applied from when the request starts connecting until the response body has finished. Default is no timeout.
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
impl !RefUnwindSafe for TransportBuilder
impl Send for TransportBuilder
impl Sync for TransportBuilder
impl Unpin for TransportBuilder
impl !UnwindSafe for TransportBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,