pub struct DownloadStream {
pub total_bytes: u64,
pub chunks: BoxStream<'static, Result<DownloadChunk, ServerError>>,
}Expand description
A pack download: its length, for the header message, then its chunks.
The stream owns its data ('static), so a binding can hand it to
Connect’s Response::stream_ok without borrowing the pipeline.
Fields§
§total_bytes: u64The pack’s length in bytes.
chunks: BoxStream<'static, Result<DownloadChunk, ServerError>>The chunks, contiguous from offset 0; only the final one is last.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DownloadStream
impl !Sync for DownloadStream
impl !UnwindSafe for DownloadStream
impl Freeze for DownloadStream
impl Send for DownloadStream
impl Unpin for DownloadStream
impl UnsafeUnpin for DownloadStream
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