use std::fmt::Debug;
pub trait HandlerOption: Default {
type Options: HandlerOptions<OptionItem=Self>;
}
pub trait HandlerOptions: Default + Clone + Debug {
type OptionItem: HandlerOption<Options=Self>;
fn update(&mut self, option: Self::OptionItem);
}
pub trait HttpOption<'a, R>: HandlerOption {
type RequestHandler;
fn request_handler(options: Self::Options) -> Self::RequestHandler;
}
pub trait WebSocketOption<H>: HandlerOption {
type WebSocketHandler;
fn websocket_handler(handler: H, options: Self::Options) -> Self::WebSocketHandler;
}