pub trait IndexBuildProgress:
Debug
+ Sync
+ Send {
// Required methods
fn stage_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stage: &'life1 str,
total: Option<u64>,
unit: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn stage_progress<'life0, 'life1, 'async_trait>(
&'life0 self,
stage: &'life1 str,
completed: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn stage_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
stage: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Progress callback for index building.
Called at stage boundaries during index construction. Stages are sequential:
stage_complete is always called before the next stage_start, so only one
stage is active at a time. Stage names are index-type-specific (e.g.
“train_ivf”, “shuffle”, “build_partitions” for vector indices; “load_data”,
“build_pages” for scalar indices).
Methods take &self to allow concurrent calls from within a single stage.
Implementations must be thread-safe.
Required Methods§
Sourcefn stage_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stage: &'life1 str,
total: Option<u64>,
unit: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stage_start<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
stage: &'life1 str,
total: Option<u64>,
unit: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
A named stage has started.
total is the number of work units if known, and unit describes
what is being counted (e.g. “partitions”, “batches”, “rows”).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".