Struct async_fetcher::ResponseState
source · pub struct ResponseState<T: Future<Item = Option<(Response, Option<DateTime<Utc>>)>, Error = Error> + Send + 'static> {
pub future: T,
pub path: PathBuf,
}
Expand description
This state manages downloading a response into the temporary location.
Fields
future: T
path: PathBuf
Implementations
sourceimpl<T: Future<Item = Option<(Response, Option<DateTime<Utc>>)>, Error = Error> + Send + 'static> ResponseState<T>
impl<T: Future<Item = Option<(Response, Option<DateTime<Utc>>)>, Error = Error> + Send + 'static> ResponseState<T>
sourcepub fn then_download(self, download_location: PathBuf) -> FetchedState
pub fn then_download(self, download_location: PathBuf) -> FetchedState
If the file is to be downloaded, this will construct a future that does just that.
sourcepub fn into_future(self) -> T
pub fn into_future(self) -> T
Convert this state into the future that it owns.
Auto Trait Implementations
impl<T> RefUnwindSafe for ResponseState<T>where
T: RefUnwindSafe,
impl<T> Send for ResponseState<T>
impl<T> Sync for ResponseState<T>where
T: Sync,
impl<T> Unpin for ResponseState<T>where
T: Unpin,
impl<T> UnwindSafe for ResponseState<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more