pub trait BundlerPositions {
// Required methods
fn positions(&self) -> CircuitPreprocessing;
fn buffered(&self) -> CircuitPreprocessing;
async fn resync(
&self,
targets: &CircuitPreprocessing,
) -> Result<(), AbortError>;
}Expand description
Runtime accessors for a preprocessing bundler’s per-type stream state. Exposed as a trait so it
remains reachable through the opaque impl PreprocessingBundler returned by bundler builders.
Required Methods§
Sourcefn positions(&self) -> CircuitPreprocessing
fn positions(&self) -> CircuitPreprocessing
The logical position (elements delivered) of every stream, per type. Stays in sync across parties; take the per-type maximum to agree on a resync target.
Sourcefn buffered(&self) -> CircuitPreprocessing
fn buffered(&self) -> CircuitPreprocessing
The number of already-generated elements currently buffered in every stream, per type — a
runtime occupancy metric, unlike positions.
Sourceasync fn resync(&self, targets: &CircuitPreprocessing) -> Result<(), AbortError>
async fn resync(&self, targets: &CircuitPreprocessing) -> Result<(), AbortError>
Advances every stream to its per-type target, realigning all parties on the same prefix —
the recovery primitive for a peer whose positions fell behind. See
StreamBundler::resync.
Only ever called through the opaque impl PreprocessingBundler (never as a dyn Trait, and
never spawned onto another task), so the lack of a Send bound on the returned future costs
nothing here — and requiring one would force a Sync bound onto every stream type this
trait is implemented for.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".