pub trait Request {
type Body: Serialize + Debug;
type Response: DeserializeOwned + Default;
const METHOD: Method;
// Required method
fn endpoint(&self) -> Cow<'_, str>;
// Provided methods
fn headers(&self) -> HashMap<String, String> { ... }
fn body(&self) -> Option<Self::Body> { ... }
}Expand description
This trait is the generic implementation for every request
we make to the Firefly III API, you can set the Body to ()
in case the request does not send a body.
Responses are in the response module.
Required Associated Constants§
Required Associated Types§
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.