1 2 3 4 5 6 7 8 9 10 11 12 13
use serde::de::DeserializeOwned; pub mod util; pub trait Api { fn interface() -> &'static str; fn method() -> &'static str; fn version() -> &'static str; type Response: DeserializeOwned; // TODO: maybe return &str && &[]? fn parameters(&self) -> impl Iterator<Item = (&str, &str)>; }