[][src]Trait elasticsearch::http::request::Body

pub trait Body {
    fn write(&self, bytes: &mut BytesMut) -> Result<(), Error>;

Body of an API call.

Some Elasticsearch APIs accept a body as part of the API call. Most APIs expect JSON, however, there are some APIs that expect newline-delimited JSON (NDJSON). The Body trait allows modelling different API body implementations.

Required methods

fn write(&self, bytes: &mut BytesMut) -> Result<(), Error>

Write to a buffer that will be written to the request stream

Loading content...

Implementations on Foreign Types

impl Body for Bytes[src]

impl Body for Vec<u8>[src]

impl Body for &'static [u8][src]

impl Body for String[src]

impl Body for &'static str[src]

impl Body for ()[src]

Loading content...


impl<T> Body for JsonBody<T> where
    T: Serialize

impl<T> Body for NdBody<T> where
    T: Body

Loading content...