pub struct DistributionStatus {
pub handle: DistributionHandle,
pub total_targets: usize,
pub completed: usize,
pub in_progress: usize,
pub failed: usize,
pub node_statuses: HashMap<String, NodeTransferStatus>,
}Expand description
Overall distribution status
Fields§
§handle: DistributionHandleThe distribution handle
total_targets: usizeTotal number of target nodes
completed: usizeNumber completed successfully
in_progress: usizeNumber currently in progress
failed: usizeNumber failed
node_statuses: HashMap<String, NodeTransferStatus>Per-node status
Implementations§
Source§impl DistributionStatus
impl DistributionStatus
Sourcepub fn new(
handle: DistributionHandle,
target_nodes: Vec<String>,
total_bytes: u64,
) -> Self
pub fn new( handle: DistributionHandle, target_nodes: Vec<String>, total_bytes: u64, ) -> Self
Create initial status for a distribution
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if distribution is complete (all nodes done or failed)
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if distribution succeeded (all targets completed)
Sourcepub fn overall_progress(&self) -> f64
pub fn overall_progress(&self) -> f64
Calculate overall progress fraction
Sourcepub fn recalculate_counts(&mut self)
pub fn recalculate_counts(&mut self)
Recalculate counts from node statuses
Trait Implementations§
Source§impl Clone for DistributionStatus
impl Clone for DistributionStatus
Source§fn clone(&self) -> DistributionStatus
fn clone(&self) -> DistributionStatus
Returns a duplicate 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 DistributionStatus
impl Debug for DistributionStatus
Source§impl<'de> Deserialize<'de> for DistributionStatus
impl<'de> Deserialize<'de> for DistributionStatus
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
Auto Trait Implementations§
impl Freeze for DistributionStatus
impl RefUnwindSafe for DistributionStatus
impl Send for DistributionStatus
impl Sync for DistributionStatus
impl Unpin for DistributionStatus
impl UnsafeUnpin for DistributionStatus
impl UnwindSafe for DistributionStatus
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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