removed the traits so this thing works

This commit is contained in:
2025-07-14 13:26:15 -04:00
parent 533f718e57
commit e96def50f3
3 changed files with 14 additions and 15 deletions

View File

@ -1,22 +1,8 @@
use async_trait::async_trait;
use proc_macro::TokenStream;
use quote::quote;
use syn::{parse_macro_input, ItemEnum, Lit, DeriveInput, Fields, Data};
#[async_trait]
pub trait Queryable {
///send the query types query and get the response returned as the
///proper response type
pub fn send(
&self,
base_url: &str,
headers: Option<Vec<(&str, &str)>>,
) -> Result<Response, std::io::Error>;
}
pub trait Responsable {
pub fn receive(resp: Response) -> Result<Self, std::error::Error>;
}
#[proc_macro_derive(HttpRequest, attributes(http_get))]
pub fn derive_http_get_request(input: TokenStream) -> TokenStream {
let input = parse_macro_input!(input as DeriveInput);