pub struct Transport { /* private fields */ }Expand description
Sends requests to one Kibana address. Clones share the connection pool.
Requests are never retried and redirects are never followed. An interrupted mutation can have an unknown outcome and must be reconciled by the caller.
Implementations§
Source§impl Transport
impl Transport
pub fn single_node(url: &str) -> Result<Self>
Sourcepub fn cloud(cloud_id: &str, credentials: Credentials) -> Result<Self>
pub fn cloud(cloud_id: &str, credentials: Credentials) -> Result<Self>
Connects to the Kibana endpoint encoded in an Elastic Cloud ID.
pub fn url(&self) -> &Url
Sourcepub async fn send<Q>(
&self,
method: Method,
path: &str,
headers: HeaderMap,
query: Option<&Q>,
body: Option<Body>,
timeout: Option<Duration>,
) -> Result<Response>
pub async fn send<Q>( &self, method: Method, path: &str, headers: HeaderMap, query: Option<&Q>, body: Option<Body>, timeout: Option<Duration>, ) -> Result<Response>
Sends one request and checks its status.
path must already be percent-encoded and is appended to the base URL.
It cannot contain a query, fragment, backslash, control character or dot
segment in literal or percent-encoded form, so it always stays under the
base path. Non-success statuses become Error::Api with at most 16 KiB of body.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Transport
impl !UnwindSafe for Transport
impl Freeze for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl UnsafeUnpin for Transport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more