pub struct Response { /* private fields */ }
Expand description

A response from Elasticsearch

Implementations

Creates a new instance of an Elasticsearch response

Get the response content-length, if known.

Reasons it may not be known:

  • The server didn’t send a content-length header.
  • The response is compressed and automatically decoded (thus changing the actual decoded length).

Gets the response content-type.

Turn the response into an Error if Elasticsearch returned an error.

Turn the response into an Error if Elasticsearch returned an error.

Asynchronously reads the response body into an Exception if Elasticsearch returned a HTTP status code in the 400-599 range.

Reading the response body consumes self

Asynchronously reads the response body as JSON

Reading the response body consumes self

Gets the response headers.

Gets the request method.

Get the HTTP status code of the response

Asynchronously reads the response body as plain text

Reading the response body consumes self

Asynchronously reads the response body as bytes

Reading the response body consumes self

Gets the request URL

Gets the Deprecation warning response headers

Deprecation headers signal the use of Elasticsearch functionality or features that are deprecated and will be removed in a future release.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more