pub struct UploadGroupProgress {
pub file_data: Arc<GroupProgress>,
pub shards: Arc<ShardUploadProgress>,
}Fields§
§file_data: Arc<GroupProgress>§shards: Arc<ShardUploadProgress>Implementations§
Source§impl UploadGroupProgress
impl UploadGroupProgress
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a group progress tracker using default speed estimation parameters.
Sourcepub fn with_speed_config(half_life: Duration, min_observations: u32) -> Self
pub fn with_speed_config(half_life: Duration, min_observations: u32) -> Self
Create a group progress tracker with explicit speed estimation parameters.
Sourcepub fn new_item(
self: &Arc<Self>,
id: UniqueId,
name: impl Into<Arc<str>>,
) -> Arc<ItemProgressUpdater>
pub fn new_item( self: &Arc<Self>, id: UniqueId, name: impl Into<Arc<str>>, ) -> Arc<ItemProgressUpdater>
Create a new tracked item and register it in the items map.
Returns an ItemProgressUpdater handle for the caller to report progress.
Sourcepub fn report(&self) -> GroupProgressReport
pub fn report(&self) -> GroupProgressReport
Snapshot of aggregate data and shard upload progress.
Sourcepub fn item_reports(&self) -> HashMap<UniqueId, ItemProgressReport>
pub fn item_reports(&self) -> HashMap<UniqueId, ItemProgressReport>
Snapshot of all per-item progress.
Sourcepub fn item_report(&self, id: UniqueId) -> Option<ItemProgressReport>
pub fn item_report(&self, id: UniqueId) -> Option<ItemProgressReport>
Snapshot of one item’s progress.
Sourcepub fn assert_complete(&self)
pub fn assert_complete(&self)
Debug verification that all items are complete.
Sourcepub fn register_shard_transfer(&self, shard_size: u64) -> UniqueId
pub fn register_shard_transfer(&self, shard_size: u64) -> UniqueId
Register a new shard upload size.
Sourcepub fn increment_shard_transfer_progress(&self, _id: UniqueId, nbytes: u64)
pub fn increment_shard_transfer_progress(&self, _id: UniqueId, nbytes: u64)
Update shard transfer bytes for transfer “_id”
Sourcepub fn decrement_shard_transfer_progress(&self, _id: UniqueId, nbytes: u64)
pub fn decrement_shard_transfer_progress(&self, _id: UniqueId, nbytes: u64)
Undo previously reported shard transfer bytes for transfer “_id”.
Sourcepub fn register_shard_upload_progress(
&self,
id: UniqueId,
event: &ShardUploadEvent,
)
pub fn register_shard_upload_progress( &self, id: UniqueId, event: &ShardUploadEvent, )
Update shard upload progress
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UploadGroupProgress
impl RefUnwindSafe for UploadGroupProgress
impl Send for UploadGroupProgress
impl Sync for UploadGroupProgress
impl Unpin for UploadGroupProgress
impl UnsafeUnpin for UploadGroupProgress
impl UnwindSafe for UploadGroupProgress
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
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more