pub trait FileObserver: Send + Sync {
// Provided methods
fn delivered(&self, received: u64, expected: u64) { ... }
fn discovering(&self) { ... }
fn pending(&self) { ... }
fn reconstructing(&self) { ... }
fn hashed(&self, bytes: u64) { ... }
fn finished(&self) { ... }
}Expand description
Where one blob of a bundle pull reports its progress. Every method has a default that does nothing.
Provided Methods§
Sourcefn delivered(&self, received: u64, expected: u64)
fn delivered(&self, received: u64, expected: u64)
received of the blob’s expected content bytes are verified. Every
fetch of the blob reports its whole position.
Sourcefn discovering(&self)
fn discovering(&self)
The blob probes its holders before any byte arrives.
Sourcefn pending(&self)
fn pending(&self)
The blob’s own bytes are in, and it waits for a sibling to land the chunks it shares.
Sourcefn reconstructing(&self)
fn reconstructing(&self)
The blob is assembled, and its whole-file hash runs.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".