pub mod content;
pub mod header;
pub mod param;
pub mod status;
pub use content::Json;
pub use header::Cookie;
pub use param::{Path, Query};
#[cold]
#[inline(never)]
fn reject(msg: impl std::fmt::Display) -> crate::Response {
crate::Response::BadRequest().with_text(msg.to_string())
}
#[cfg(feature = "openapi")]
mod bound {
use crate::openapi;
use serde::{Deserialize, Serialize};
pub trait Schema: openapi::Schema {}
impl<S: openapi::Schema> Schema for S {}
pub trait Incoming<'req>: Deserialize<'req> + openapi::Schema {}
impl<'req, T> Incoming<'req> for T where T: Deserialize<'req> + openapi::Schema {}
pub trait Outgoing: Serialize + openapi::Schema {}
impl<T> Outgoing for T where T: Serialize + openapi::Schema {}
}
#[cfg(not(feature = "openapi"))]
mod bound {
use serde::{Deserialize, Serialize};
pub trait Schema {}
impl<S> Schema for S {}
pub trait Incoming<'req>: Deserialize<'req> {}
impl<'req, T> Incoming<'req> for T where T: Deserialize<'req> {}
pub trait Outgoing: Serialize {}
impl<T> Outgoing for T where T: Serialize {}
}