[][src]Trait ring_api::requests::Request

pub trait Request {
    type Body: Serialize;
    type Response: for<'de> Deserialize<'de>;

    const METHOD: Method;

    fn endpoint(&self) -> Cow<str>;

    fn headers(&self) -> HeaderMap { ... }
fn body(&self) -> RequestBody<&Self::Body> { ... } }

A RING API request.

Associated Types

type Body: Serialize

The type of the body for this request. TODO(H2CO3): default to ().

type Response: for<'de> Deserialize<'de>

The "return type" of the request.

Loading content...

Associated Constants

const METHOD: Method

The HTTP method ("verb") for the request.

Loading content...

Required methods

fn endpoint(&self) -> Cow<str>

The endpoint: the part of the URL/path that follows the base URL.

Loading content...

Provided methods

fn headers(&self) -> HeaderMap

Additional headers for this request.

fn body(&self) -> RequestBody<&Self::Body>

The body of the request, if any

Loading content...

Implementations on Foreign Types

impl<'_, R: Request> Request for &'_ R[src]

type Body = R::Body

type Response = R::Response

impl<'_, R: Request> Request for &'_ mut R[src]

type Body = R::Body

type Response = R::Response

Loading content...

Implementors

impl Request for RetrieveResult[src]

impl Request for Status[src]

type Body = ()

type Response = StatusResponse

impl Request for SubmitId[src]

type Body = Self

type Response = SubmitResponse

impl Request for SubmitStructure[src]

type Body = Self

type Response = SubmitResponse

Loading content...