pub trait OpenAPI<'a> {
    type Output: 'a;

    // Required method
    fn execute(&'a self, method: &str, uri: &str) -> Self::Output;

    // Provided methods
    fn get(&'a self, uri: &str) -> Self::Output { ... }
    fn post(&'a self, uri: &str) -> Self::Output { ... }
    fn put(&'a self, uri: &str) -> Self::Output { ... }
}

Required Associated Types§

source

type Output: 'a

Required Methods§

source

fn execute(&'a self, method: &str, uri: &str) -> Self::Output

Create a request with the method and uri.

Returns a RequestBuilder for send request.

Provided Methods§

source

fn get(&'a self, uri: &str) -> Self::Output

Create a GET request with the uri.

Returns a RequestBuilder for send request.

source

fn post(&'a self, uri: &str) -> Self::Output

Create a POST request with the uri.

Returns a RequestBuilder for send request.

source

fn put(&'a self, uri: &str) -> Self::Output

Create a PUT request with the uri.

Returns a RequestBuilder for send request.

Implementors§