Skip to main content

DependencyMetadataProvider

Trait DependencyMetadataProvider 

Source
pub trait DependencyMetadataProvider: Send + Sync {
    // Required method
    fn fetch_metadata(
        &self,
        requested_names: &[String],
        timeout: Duration,
    ) -> Vec<DependencyMetadataResponse>;
}
Expand description

What: Fetch verified raw .SRCINFO metadata for graph-resolution requests.

Inputs:

  • A lexically sorted batch of requested package or virtual names.
  • A per-batch timeout supplied by DependencyGraphConfig.

Output:

  • Returns one DependencyMetadataResponse per request whenever possible.

Details:

  • The trait belongs to deps and has no AUR, HTTP, runtime, or helper dependency. Providers may batch internally and must honor the supplied timeout for cancellable I/O. The synchronous resolver issues batches serially, so it never has more than one provider call in flight.

Required Methods§

Source

fn fetch_metadata( &self, requested_names: &[String], timeout: Duration, ) -> Vec<DependencyMetadataResponse>

What: Retrieve raw metadata for a bounded batch of requested names.

Inputs:

  • requested_names: Lexically sorted, unique requested package or virtual names.
  • timeout: Maximum time allocated to this provider batch.

Output:

  • Returns found, missing, or failed metadata responses.

Details:

  • Providers should return a response for every input. The resolver records a structured protocol diagnostic for omitted, duplicate, or unrequested responses.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§