#![feature(rustdoc_internals)]
#[cfg(feature = "macro")]
pub mod macros {
pub use drought_macros::*;
#[macro_export]
macro_rules! lambda {
(|$($arg:pat_param),*| { $($bl:tt)* }) => {
|$($arg),*| Box::pin(async move { $($bl)* })
};
}
#[macro_export]
macro_rules! simple {
(|$a:pat_param, $b:pat_param, $c:pat_param, $d:pat_param| { $($bl:tt)* }) => {
|$a, $b, $c, $d| Box::pin(async move {
$crate::droughter::DroughtResult::Handle(
http::Response::builder()
.status(200)
.body({ $($bl)* })
.unwrap()
)
})
};
}
#[macro_export]
macro_rules! handle {
(|$a:pat_param, $b:pat_param, $c:pat_param, $d:pat_param| { $($bl:tt)* }) => {
|$a, $b, $c, $d| Box::pin(async move {
$crate::droughter::DroughtResult::Handle({ $($bl)* })
})
};
}
}
pub mod droughter;
pub use droughter::{Drought, Droughter, DroughterBuilder, DroughterResult, DroughtResult};
mod util;