You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
477 B
Rust

mod metadata;
mod options;
mod update;
use crate::Result;
use std::fmt::Debug;
pub use metadata::*;
pub use options::*;
pub use update::*;
pub trait Endpoint {
fn path() -> &'static str;
}
pub trait GetEndpoint: Endpoint {
type Response: FromJson + Debug;
}
pub trait PostEndpoint: Endpoint {
type Request;
type Response: FromJson + Debug;
}
pub trait FromJson {
fn from_json(value: serde_json::Value) -> Result<Self>
where
Self: Sized;
}