Trait wasmer_wasix::runtime::resolver::Source

source ·
pub trait Source: Sync + Debug {
    // Required method
    fn query<'life0, 'life1, 'async_trait>(
        &'life0 self,
        package: &'life1 PackageSource,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<PackageSummary>, QueryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn latest<'life0, 'life1, 'async_trait>(
        &'life0 self,
        pkg: &'life1 PackageSource,
    ) -> Pin<Box<dyn Future<Output = Result<PackageSummary, QueryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}
Expand description

Something that packages can be downloaded from.

Required Methods§

source

fn query<'life0, 'life1, 'async_trait>( &'life0 self, package: &'life1 PackageSource, ) -> Pin<Box<dyn Future<Output = Result<Vec<PackageSummary>, QueryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Ask this source which packages would satisfy a particular Dependency constraint.

§Assumptions

If this method returns a successful result, it is guaranteed that there will be at least one PackageSummary, otherwise implementations should return QueryError::NotFound or QueryError::NoMatches.

Provided Methods§

source

fn latest<'life0, 'life1, 'async_trait>( &'life0 self, pkg: &'life1 PackageSource, ) -> Pin<Box<dyn Future<Output = Result<PackageSummary, QueryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Run Source::query() and get the PackageSummary for the latest version.

Implementors§

source§

impl Source for BackendSource

source§

impl Source for FileSystemSource

source§

impl Source for InMemorySource

source§

impl Source for MultiSource

source§

impl Source for WebSource

source§

impl<D, S> Source for D
where D: Deref<Target = S> + Debug + Send + Sync, S: Source + ?Sized + Send + Sync + 'static,