Trait viz_core::RequestExt
source · [−]pub trait RequestExt {
Show 22 methods
fn path(&self) -> &str;
fn query_string(&self) -> Option<&str>;
fn header<K, T>(&self, key: K) -> Option<T>
where
K: AsHeaderName,
T: FromStr;
fn content_length(&self) -> Option<u64>;
fn content_type(&self) -> Option<Mime>;
fn extract<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T, T::Error>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
T: FromRequest,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait;
fn query<T>(&self) -> Result<T, PayloadError>
where
T: DeserializeOwned;
fn read<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait;
fn read_with<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
max: u64
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn bytes<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait;
fn text<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait;
fn form<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
T: DeserializeOwned,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait;
fn json<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
T: DeserializeOwned,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait;
fn multipart<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Multipart, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait;
fn data<T>(&self) -> Option<T>
where
T: Clone + Send + Sync + 'static;
fn set_data<T>(&mut self, t: T) -> Option<T>
where
T: Clone + Send + Sync + 'static;
fn cookies(&self) -> Result<Cookies, CookiesError>;
fn cookie<S>(&self, name: S) -> Option<Cookie<'_>>
where
S: AsRef<str>;
fn limits(&self) -> Limits;
fn session(&self) -> &Session;
fn params<T>(&self) -> Result<T, ParamsError>
where
T: DeserializeOwned;
fn param<T>(&self, name: &str) -> Result<T, ParamsError>
where
T: FromStr,
T::Err: Display;
}
Required Methods
fn query_string(&self) -> Option<&str>
fn header<K, T>(&self, key: K) -> Option<T> where
K: AsHeaderName,
T: FromStr,
fn content_length(&self) -> Option<u64>
fn content_type(&self) -> Option<Mime>
fn extract<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T, T::Error>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
T: FromRequest,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
fn query<T>(&self) -> Result<T, PayloadError> where
T: DeserializeOwned,
fn query<T>(&self) -> Result<T, PayloadError> where
T: DeserializeOwned,
Available on crate feature
query
only.fn read<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
fn read<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Reads bytes
fn read_with<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
max: u64
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn read_with<'life0, 'life1, 'async_trait>(
&'life0 mut self,
name: &'life1 str,
max: u64
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Available on crate feature
limits
only.Reads bytes with a limit by name.
fn bytes<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
fn bytes<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Bytes, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Reads the request body, and returns with a raw binary data buffer.
fn text<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
fn text<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<String, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Reads the request body, and returns with a String, it is always decoded using UTF-8.
fn form<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
T: DeserializeOwned,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn form<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
T: DeserializeOwned,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Available on crate feature
form
only.fn json<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
T: DeserializeOwned,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn json<'life0, 'async_trait, T>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<T, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
T: DeserializeOwned,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Available on crate feature
json
only.Reads the request body, and returns with a JSON.
fn multipart<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Multipart, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
fn multipart<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Multipart, PayloadError>> + Send + 'async_trait>>ⓘNotable traits for Pin<P>impl<P> Future for Pin<P> where
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
where
'life0: 'async_trait,
Self: 'async_trait,
P: DerefMut,
<P as Deref>::Target: Future, type Output = <<P as Deref>::Target as Future>::Output;
Available on crate feature
multipart
only.Available on crate feature
data
only.Available on crate feature
data
only.Available on crate feature
cookie
only.Available on crate feature
cookie
only.fn params<T>(&self) -> Result<T, ParamsError> where
T: DeserializeOwned,
fn params<T>(&self) -> Result<T, ParamsError> where
T: DeserializeOwned,
Available on crate feature
params
only.Gets all parameters.