mod any_form;
mod handler;
mod hooks;
pub mod into_request_config;
use crate::{
app::RequestContext,
routing::RouteMethod,
types::BoxFuture,
web::{Body, IntoJsonResponse},
};
pub use any_form::*;
pub use handler::*;
pub use hooks::*;
pub trait Action: 'static {
type Response: IntoJsonResponse + 'static;
fn route() -> &'static str;
fn method() -> RouteMethod {
RouteMethod::GET
| RouteMethod::POST
| RouteMethod::PUT
| RouteMethod::PATCH
| RouteMethod::DELETE
}
fn call(ctx: RequestContext, body: Body) -> BoxFuture<crate::Result<Self::Response>>;
}