[−][src]Struct iron::request::Request
The Request
given to all Middleware
.
Stores all the properties of the client's request plus
an TypeMap
for data communication between middleware.
Fields
url: Url
The requested URL.
remote_addr: SocketAddr
The originating address of the request.
local_addr: SocketAddr
The local address of the request.
headers: Headers
The request headers.
body: Body<'a, 'b>
The request body as a reader.
method: Method
The request method.
extensions: TypeMap
Extensible storage for data passed between middleware.
version: HttpVersion
The version of the HTTP protocol used.
Methods
impl<'a, 'b> Request<'a, 'b>
[src]
pub fn from_http(
req: HttpRequest<'a, 'b>,
local_addr: SocketAddr,
protocol: &Protocol
) -> Result<Request<'a, 'b>, String>
[src]
req: HttpRequest<'a, 'b>,
local_addr: SocketAddr,
protocol: &Protocol
) -> Result<Request<'a, 'b>, String>
Create a request from an HttpRequest.
This constructor consumes the HttpRequest.
Trait Implementations
impl<'a, 'b> Debug for Request<'a, 'b>
[src]
impl<'a, 'b> Extensible for Request<'a, 'b>
[src]
fn extensions(&self) -> &TypeMap
[src]
fn extensions_mut(&mut self) -> &mut TypeMap
[src]
impl<'a, 'b> Pluggable for Request<'a, 'b>
[src]
fn get<P>(&mut self) -> Result<<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Clone,
<P as Key>::Value: Any,
[src]
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Clone,
<P as Key>::Value: Any,
Return a copy of the plugin's produced value. Read more
fn get_ref<P>(
&mut self
) -> Result<&<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Any,
[src]
&mut self
) -> Result<&<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Any,
Return a reference to the plugin's produced value. Read more
fn get_mut<P>(
&mut self
) -> Result<&mut <P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Any,
[src]
&mut self
) -> Result<&mut <P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Self: Extensible,
<P as Key>::Value: Any,
Return a mutable reference to the plugin's produced value. Read more
fn compute<P>(
&mut self
) -> Result<<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
[src]
&mut self
) -> Result<<P as Key>::Value, <P as Plugin<Self>>::Error> where
P: Plugin<Self>,
Create and evaluate a once-off instance of a plugin.
impl<'a, 'b, H> Modifier<Request<'a, 'b>> for Header<H> where
H: Header + HeaderFormat,
[src]
H: Header + HeaderFormat,
impl<'a, 'b> Set for Request<'a, 'b>
[src]
Auto Trait Implementations
impl<'a, 'b> !Sync for Request<'a, 'b>
impl<'a, 'b> Unpin for Request<'a, 'b> where
'b: 'a,
'b: 'a,
impl<'a, 'b> !Send for Request<'a, 'b>
impl<'a, 'b> !UnwindSafe for Request<'a, 'b>
impl<'a, 'b> !RefUnwindSafe for Request<'a, 'b>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> DebugAny for T where
T: Any + Debug,
[src]
T: Any + Debug,
impl<T> UnsafeAny for T where
T: Any,
T: Any,