pub enum DownloadProgressEvent {
InitialState(TransferState),
FoundLocal {
child: BlobId,
hash: Hash,
size: BaoBlobSize,
valid_ranges: RangeSpec,
},
Connected,
Found {
id: u64,
child: BlobId,
hash: Hash,
size: u64,
},
FoundHashSeq {
hash: Hash,
children: u64,
},
Progress {
id: u64,
offset: u64,
},
Done {
id: u64,
},
AllDone(Stats),
Abort(Error),
}
Available on crate feature
rpc
only.Expand description
Progress updates for the get operation.
Variants§
InitialState(TransferState)
Initial state if subscribing to a running or queued transfer.
FoundLocal
Data was found locally.
Fields
§
size: BaoBlobSize
The size of the entry in bytes.
Connected
A new connection was established.
Found
An item was found with hash hash
, from now on referred to via id
.
Fields
§
child: BlobId
Identifier for this blob within this download.
Will always be BlobId::Root
unless a hashseq is downloaded, in which case this
allows to identify the children by their offset in the hashseq.
FoundHashSeq
An item was found with hash hash
, from now on referred to via id
.
Fields
Progress
We got progress ingesting item id
.
Done
We are done with id
.
AllDone(Stats)
All operations finished.
This will be the last message in the stream.
Abort(Error)
We got an error and need to abort.
This will be the last message in the stream.
Trait Implementations§
Source§impl Clone for DownloadProgressEvent
impl Clone for DownloadProgressEvent
Source§fn clone(&self) -> DownloadProgressEvent
fn clone(&self) -> DownloadProgressEvent
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 DownloadProgressEvent
impl Debug for DownloadProgressEvent
Source§impl<'de> Deserialize<'de> for DownloadProgressEvent
impl<'de> Deserialize<'de> for DownloadProgressEvent
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<DownloadProgressEvent> for DownloadResponse
impl From<DownloadProgressEvent> for DownloadResponse
Source§fn from(value: DownloadProgressEvent) -> Self
fn from(value: DownloadProgressEvent) -> Self
Converts to this type from the input type.
Source§impl From<DownloadResponse> for DownloadProgressEvent
impl From<DownloadResponse> for DownloadProgressEvent
Source§fn from(value: DownloadResponse) -> Self
fn from(value: DownloadResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DownloadProgressEvent
impl RefUnwindSafe for DownloadProgressEvent
impl Send for DownloadProgressEvent
impl Sync for DownloadProgressEvent
impl Unpin for DownloadProgressEvent
impl UnwindSafe for DownloadProgressEvent
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