Trait trillium_client::ClientLike
source · pub trait ClientLike {
// Required method
fn build_conn(&self, method: Method, url: Url) -> Conn;
// Provided methods
fn get(&self, url: Url) -> Conn
where Self: Sized { ... }
fn post(&self, url: Url) -> Conn
where Self: Sized { ... }
fn put(&self, url: Url) -> Conn
where Self: Sized { ... }
fn delete(&self, url: Url) -> Conn
where Self: Sized { ... }
fn patch(&self, url: Url) -> Conn
where Self: Sized { ... }
}Expand description
Trait for things that operate like a client. The only interface that’s required is build_conn.
Required Methods§
sourcefn build_conn(&self, method: Method, url: Url) -> Conn
fn build_conn(&self, method: Method, url: Url) -> Conn
constructs a conn for the specified method and url.
Provided Methods§
sourcefn get(&self, url: Url) -> Connwhere
Self: Sized,
fn get(&self, url: Url) -> Connwhere
Self: Sized,
Builds a new client conn with the get http method and the provided url.
sourcefn post(&self, url: Url) -> Connwhere
Self: Sized,
fn post(&self, url: Url) -> Connwhere
Self: Sized,
Builds a new client conn with the post http method and the provided url.
sourcefn put(&self, url: Url) -> Connwhere
Self: Sized,
fn put(&self, url: Url) -> Connwhere
Self: Sized,
Builds a new client conn with the put http method and the provided url.