pub trait Target {
// Required methods
fn base_url(&self) -> Cow<'_, str>;
fn method(&self) -> HTTPMethod;
fn path(&self) -> String;
fn query(&self) -> HashMap<String, String>;
fn headers(&self) -> HashMap<String, String>;
fn authentication(&self) -> Option<AuthMethod>;
fn body(&self) -> Result<HTTPBody, Error>;
// Provided methods
fn query_string(&self) -> String { ... }
fn absolute_url(&self) -> String { ... }
}Required Methods§
fn base_url(&self) -> Cow<'_, str>
fn method(&self) -> HTTPMethod
fn path(&self) -> String
fn query(&self) -> HashMap<String, String>
fn headers(&self) -> HashMap<String, String>
Sourcefn authentication(&self) -> Option<AuthMethod>
fn authentication(&self) -> Option<AuthMethod>
Specifies the AuthMethod for the request, or None if no authentication.
fn body(&self) -> Result<HTTPBody, Error>
Provided Methods§
fn query_string(&self) -> String
fn absolute_url(&self) -> String
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".