Skip to main content

args_api/
endpoint.rs

1pub mod auth;
2pub mod bug;
3pub mod build;
4pub mod metrics;
5pub mod migration;
6pub mod organization;
7pub mod question;
8pub mod repository;
9pub mod review;
10pub mod runner;
11pub mod task;
12pub mod user;
13pub mod webhook;
14
15use serde::{Serialize, de::DeserializeOwned};
16
17use crate::ApiResource;
18
19pub use bug::*;
20pub use build::*;
21pub use migration::*;
22pub use organization::*;
23pub use question::*;
24pub use repository::*;
25pub use review::*;
26pub use runner::*;
27pub use task::*;
28pub use user::*;
29pub use webhook::*;
30
31pub trait Endpoint {
32    const PATH: &'static str;
33    const METHOD: http::Method;
34
35    type Request: ApiRequest;
36    type Response: ApiResource;
37}
38
39pub trait ApiRequest: Serialize + DeserializeOwned + Send {}
40
41impl ApiRequest for () {}