[][src]Struct elastic_responses::GetResponse

pub struct GetResponse<T> { /* fields omitted */ }

Response for a get document request.

Methods

impl<T> GetResponse<T>[src]

pub fn document(&self) -> Option<&T>[src]

Get a reference to the source document.

pub fn into_document(self) -> Option<T>[src]

Convert the response into the source document.

pub fn found(&self) -> bool[src]

Whether or not a matching document was found.

pub fn index(&self) -> &str[src]

The index for the document.

pub fn ty(&self) -> &str[src]

The type of the document.

pub fn id(&self) -> &str[src]

The id of the document.

pub fn version(&self) -> Option<u32>[src]

The version of the document.

Trait Implementations

impl<T: DeserializeOwned> IsOk for GetResponse<T>[src]

impl<T: Debug> Debug for GetResponse<T>[src]

impl<'de, T> Deserialize<'de> for GetResponse<T> where
    T: Deserialize<'de>, 
[src]

Auto Trait Implementations

impl<T> Send for GetResponse<T> where
    T: Send

impl<T> Sync for GetResponse<T> where
    T: Sync

Blanket Implementations

impl<T> IsOk for T where
    T: IsOkOnSuccess
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]