Struct iroh_blobs::downloader::DownloadRequest
source · pub struct DownloadRequest { /* private fields */ }
Available on crate feature
downloader
only.Expand description
A download request.
Implementations§
source§impl DownloadRequest
impl DownloadRequest
sourcepub fn new(
resource: impl Into<DownloadKind>,
nodes: impl IntoIterator<Item = impl Into<NodeAddr>>
) -> Self
pub fn new( resource: impl Into<DownloadKind>, nodes: impl IntoIterator<Item = impl Into<NodeAddr>> ) -> Self
Create a new download request.
It is the responsibility of the caller to ensure that the data is tagged either with a temp tag or with a persistent tag to make sure the data is not garbage collected during the download.
If this is not done, there download will proceed as normal, but there is no guarantee that the data is still available when the download is complete.
sourcepub fn progress_sender(
self,
sender: AsyncChannelProgressSender<DownloadProgress>
) -> Self
pub fn progress_sender( self, sender: AsyncChannelProgressSender<DownloadProgress> ) -> Self
Pass a progress sender to receive progress updates.
Trait Implementations§
source§impl Clone for DownloadRequest
impl Clone for DownloadRequest
source§fn clone(&self) -> DownloadRequest
fn clone(&self) -> DownloadRequest
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for DownloadRequest
impl RefUnwindSafe for DownloadRequest
impl Send for DownloadRequest
impl Sync for DownloadRequest
impl Unpin for DownloadRequest
impl UnwindSafe for DownloadRequest
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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