pub struct WasmBuildInputSnapshot<'guard> { /* private fields */ }Expand description
Immutable prepared Cargo input resolution shared by concurrent readers.
Preparation resolves the complete declared specification set while the
caller holds a genuine source write-exclusion guard. Reader batches may run
concurrently through &self, but cannot introduce specifications that
were not declared during preparation.
Implementations§
Source§impl<'guard> WasmBuildInputSnapshot<'guard>
impl<'guard> WasmBuildInputSnapshot<'guard>
Sourcepub fn prepare_assuming_sources_immutable<Guard: ?Sized>(
_source_write_guard: &'guard Guard,
specs: &[WasmBuildSpec],
) -> Result<Self, WasmBuildError>
pub fn prepare_assuming_sources_immutable<Guard: ?Sized>( _source_write_guard: &'guard Guard, specs: &[WasmBuildSpec], ) -> Result<Self, WasmBuildError>
Resolve and freeze the complete specification set under a source lease.
The guard must prevent mutation of every Cargo/rustc executable, manifest, configuration file, discovered source, declared additional input, and relevant environment value used by the supplied specifications. The type system cannot verify guard provenance.
Sourcepub fn build_batch(
&self,
specs: &[LabeledWasmBuildSpec],
config: WasmBuildBatchConfig,
) -> Result<WasmBuildBatchReport, WasmBuildBatchContractError>
pub fn build_batch( &self, specs: &[LabeledWasmBuildSpec], config: WasmBuildBatchConfig, ) -> Result<WasmBuildBatchReport, WasmBuildBatchContractError>
Build one sequential collect-all batch from prepared inputs.
Separate calls may run concurrently. Every exact specification must
have been supplied to Self::prepare_assuming_sources_immutable.
Sourcepub fn build_batch_with_progress<F>(
&self,
specs: &[LabeledWasmBuildSpec],
batch_config: WasmBuildBatchConfig,
progress_config: WasmBuildProgressConfig,
observer: F,
) -> Result<WasmBuildBatchReport, WasmBuildBatchContractError>where
F: FnMut(WasmBuildBatchProgressEvent),
pub fn build_batch_with_progress<F>(
&self,
specs: &[LabeledWasmBuildSpec],
batch_config: WasmBuildBatchConfig,
progress_config: WasmBuildProgressConfig,
observer: F,
) -> Result<WasmBuildBatchReport, WasmBuildBatchContractError>where
F: FnMut(WasmBuildBatchProgressEvent),
Build one observed sequential batch from prepared inputs.
Separate calls may run concurrently and use independent observers.
Sourcepub fn metrics(&self) -> WasmBuildInputSnapshotMetrics
pub fn metrics(&self) -> WasmBuildInputSnapshotMetrics
Current preparation, reader-reuse, and invalidation metrics.