Struct iroh_blobs::net_protocol::BlobDownloadRequest
source · pub struct BlobDownloadRequest {
pub hash: Hash,
pub format: BlobFormat,
pub nodes: Vec<NodeAddr>,
pub tag: SetTagOption,
pub mode: DownloadMode,
}
Available on crate feature
downloader
only.Expand description
A request to the node to download and share the data specified by the hash.
Fields§
§hash: Hash
This mandatory field contains the hash of the data to download and share.
format: BlobFormat
If the format is BlobFormat::HashSeq
, all children are downloaded and shared as
well.
nodes: Vec<NodeAddr>
This mandatory field specifies the nodes to download the data from.
If set to more than a single node, they will all be tried. If mode
is set to
DownloadMode::Direct
, they will be tried sequentially until a download succeeds.
If mode
is set to DownloadMode::Queued
, the nodes may be dialed in parallel,
if the concurrency limits permit.
tag: SetTagOption
Optional tag to tag the data with.
mode: DownloadMode
Whether to directly start the download or add it to the download queue.
Trait Implementations§
source§impl Clone for BlobDownloadRequest
impl Clone for BlobDownloadRequest
source§fn clone(&self) -> BlobDownloadRequest
fn clone(&self) -> BlobDownloadRequest
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 moresource§impl Debug for BlobDownloadRequest
impl Debug for BlobDownloadRequest
source§impl<'de> Deserialize<'de> for BlobDownloadRequest
impl<'de> Deserialize<'de> for BlobDownloadRequest
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<BlobDownloadRequest> for Request
Available on crate feature rpc
only.
impl From<BlobDownloadRequest> for Request
Available on crate feature
rpc
only.source§fn from(value: BlobDownloadRequest) -> Self
fn from(value: BlobDownloadRequest) -> Self
Converts to this type from the input type.
source§impl From<BlobDownloadRequest> for Request
Available on crate feature rpc
only.
impl From<BlobDownloadRequest> for Request
Available on crate feature
rpc
only.source§fn from(value: BlobDownloadRequest) -> Self
fn from(value: BlobDownloadRequest) -> Self
Converts to this type from the input type.
source§impl Msg<RpcService> for BlobDownloadRequest
Available on crate feature rpc
only.
impl Msg<RpcService> for BlobDownloadRequest
Available on crate feature
rpc
only.source§impl Serialize for BlobDownloadRequest
impl Serialize for BlobDownloadRequest
source§impl ServerStreamingMsg<RpcService> for BlobDownloadRequest
Available on crate feature rpc
only.
impl ServerStreamingMsg<RpcService> for BlobDownloadRequest
Available on crate feature
rpc
only.§type Response = DownloadResponse
type Response = DownloadResponse
The type for the response Read more
source§impl<'a> TryFrom<&'a Request> for &'a BlobDownloadRequest
Available on crate feature rpc
only.
impl<'a> TryFrom<&'a Request> for &'a BlobDownloadRequest
Available on crate feature
rpc
only.source§impl<'a> TryFrom<&'a Request> for &'a BlobDownloadRequest
Available on crate feature rpc
only.
impl<'a> TryFrom<&'a Request> for &'a BlobDownloadRequest
Available on crate feature
rpc
only.source§impl TryFrom<Request> for BlobDownloadRequest
Available on crate feature rpc
only.
impl TryFrom<Request> for BlobDownloadRequest
Available on crate feature
rpc
only.Auto Trait Implementations§
impl !Freeze for BlobDownloadRequest
impl RefUnwindSafe for BlobDownloadRequest
impl Send for BlobDownloadRequest
impl Sync for BlobDownloadRequest
impl Unpin for BlobDownloadRequest
impl UnwindSafe for BlobDownloadRequest
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