hydrus_ptr_client/endpoints/
mod.rs

1mod metadata;
2mod options;
3mod update;
4
5use crate::Result;
6use std::fmt::Debug;
7
8pub use metadata::*;
9pub use options::*;
10pub use update::*;
11
12pub trait Endpoint {
13    fn path() -> &'static str;
14}
15
16pub trait GetEndpoint: Endpoint {
17    type Response: FromJson + Debug;
18}
19
20pub trait PostEndpoint: Endpoint {
21    type Request;
22    type Response: FromJson + Debug;
23}
24
25pub trait FromJson {
26    fn from_json(value: serde_json::Value) -> Result<Self>
27    where
28        Self: Sized;
29}