use educe::Educe;
use serde::Serialize;
use teo_parser::ast::handler::HandlerInputFormat;
use teo_parser::r#type::Type;
use crate::middleware::next::Next;
#[derive(Debug, Serialize, Copy, Clone, Hash, Eq, PartialEq)]
pub enum Method {
Get,
Post,
Patch,
Put,
Delete,
Options,
}
#[derive(Educe)]
#[educe(Debug)]
#[derive(Serialize, Clone)]
pub struct Handler {
pub path: Vec<String>,
pub input_type: Type,
pub format: HandlerInputFormat,
pub method: Method,
pub url: Option<String>,
pub ignore_prefix: bool,
#[serde(skip)] #[educe(Debug(ignore))]
pub call: &'static dyn Next,
}