Query

Trait Query 

Source
pub trait Query {
    // Required method
    fn endpoint(&self) -> Cow<'static, str>;

    // Provided methods
    fn params(&self) -> QueryParams<'_> { ... }
    fn body(&self) -> Result<Option<&'static str>, &'static str> { ... }
}

Required Methods§

Source

fn endpoint(&self) -> Cow<'static, str>

Making HTTP request to this endpoint.

Provided Methods§

Source

fn params(&self) -> QueryParams<'_>

Optional. Array of key value pairs.

Source

fn body(&self) -> Result<Option<&'static str>, &'static str>

Optional. Generally a &'static str serialized by serde_json.

Implementors§