pub trait BaseRequest: Send + Sync {
type Mid: BaseMiddleware;
type Usr: BaseUser;
type SqlPool: AsDb;
type Cache: BaseCache;
Show 21 methods
// Required methods
fn new<'async_trait>(
request: HyperRequest,
url: Arc<HashMap<usize, Vec<String>>>,
pool: Arc<Self::SqlPool>,
cache: Self::Cache,
rng: Rng,
admin: AdminRef<Self>,
mailer: Option<Mailer>
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>>
where Self: Sized + 'async_trait;
fn method(&self) -> &Method;
fn url(&self) -> &str;
fn query(&self) -> Option<&str>;
fn headers(&self) -> &HeaderMap;
fn body(&self) -> &Option<Body>;
fn cookies(&self) -> &Cookies;
fn params(&self) -> &Parameters;
fn params_mut(&mut self) -> &mut Parameters;
fn raw(&self) -> &RawRequest<Self::SqlPool>;
fn raw_mut(&mut self) -> &mut RawRequest<Self::SqlPool>;
fn mid(&self) -> &Self::Mid;
fn to_form_map(&self) -> Result<FormMap>;
fn from(
raw: RawRequest<Self::SqlPool>,
mid: Self::Mid,
cache: Self::Cache,
urls: Arc<HashMap<usize, Vec<String>>>,
admin: AdminRef<Self>,
mailer: Option<Mailer>
) -> Self
where Self: Sized;
fn user(&self) -> &Self::Usr;
fn user_mut(&mut self) -> &mut Self::Usr;
fn cache(&self) -> &Self::Cache;
fn cache_mut(&mut self) -> &mut Self::Cache;
fn email(&self) -> EmailBuilder<'_>;
fn to_raw(self) -> RawRequest<Self::SqlPool>;
fn handle_no_session<'async_trait>(
response: Response,
pool: Arc<Self::SqlPool>,
std_rng: Rng
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: Sized + 'async_trait;
}
Formats the value using the given formatter.
Read more