pub struct Downloader<'a, State> { /* private fields */ }Expand description
A Downloader can be used to stream a mod file or save the file to a local file.
Constructed with Download::download.
Implementations§
Source§impl<'a> Downloader<'a, Init<'a>>
impl<'a> Downloader<'a, Init<'a>>
Sourcepub async fn chunked(self) -> Result<Downloader<'a, Chunked>, Error>
pub async fn chunked(self) -> Result<Downloader<'a, Chunked>, Error>
Retrieve the mod file in chunks of Bytes.
§Example
let action = modio::util::download::DownloadAction::Primary {
game_id: Id::new(5),
mod_id: Id::new(19),
};
let mut chunked = modio.download(action).chunked().await?;
while let Some(bytes) = chunked.data().await {
println!("Bytes: {:?}", bytes);
}Auto Trait Implementations§
impl<'a, State> Freeze for Downloader<'a, State>where
State: Freeze,
impl<'a, State> RefUnwindSafe for Downloader<'a, State>where
State: RefUnwindSafe,
impl<'a, State> Send for Downloader<'a, State>where
State: Send,
impl<'a, State> Sync for Downloader<'a, State>where
State: Sync,
impl<'a, State> Unpin for Downloader<'a, State>where
State: Unpin,
impl<'a, State> UnwindSafe for Downloader<'a, State>where
State: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
Compresses response bodies. Read more
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more