Trait tower_web::extract::ExtractFuture [−][src]
pub trait ExtractFuture {
type Item;
fn poll(&mut self) -> Poll<(), Error>;
fn extract(self) -> Self::Item;
}Future representing the completion of extracting a value from a request
Implementations are expected to advance to a state where extract will
succeed. This is done by performing any asynchronous processing when poll
is called and usually stashing the extracted value internally until
extract is called.
extract must not be called until poll returns Ok(Ready(())).
Associated Types
type Item
The argument extracted from the request.
Required Methods
fn poll(&mut self) -> Poll<(), Error>
Returns Ok(Ready(())) when extract() can be called. If NotReady is
returned, the current task is registered for wakeup.
fn extract(self) -> Self::Item
Consume self and return the value extracted from the HTTP request.
Implementors
impl<T> ExtractFuture for Immediate<T> type Item = T;impl<T> ExtractFuture for ExtractOptionFuture<T> where
T: ExtractFuture, type Item = Option<T::Item>;