Struct rs_es::operations::get::GetResult [] [src]

pub struct GetResult {
    pub index: String,
    pub doc_type: String,
    pub id: String,
    pub version: Option<u64>,
    pub found: bool,
    pub source: Option<Json>,
}

The result of a GET request

Fields

index
doc_type
id
version
found
source

Methods

impl GetResult

fn source<T: Decodable>(self) -> Result<T, EsError>

The result is a JSON document, this function will attempt to decode it to a struct. If the raw JSON is required, it can accessed directly from the source field of the GetResult struct.

Trait Implementations

impl<'a> From<&'a Json> for GetResult

fn from(r: &'a Json) -> GetResult

Derived Implementations

impl Debug for GetResult

fn fmt(&self, __arg_0: &mut Formatter) -> Result