Trait cargo::core::registry::Registry

source ·
pub trait Registry {
    // Required methods
    fn query(
        &mut self,
        dep: &Dependency,
        kind: QueryKind,
        f: &mut dyn FnMut(Summary)
    ) -> Poll<CargoResult<()>>;
    fn describe_source(&self, source: SourceId) -> String;
    fn is_replaced(&self, source: SourceId) -> bool;
    fn block_until_ready(&mut self) -> CargoResult<()>;

    // Provided method
    fn query_vec(
        &mut self,
        dep: &Dependency,
        kind: QueryKind
    ) -> Poll<CargoResult<Vec<Summary>>> { ... }
}
Expand description

Source of information about a group of packages.

See also core::Source.

Required Methods§

source

fn query( &mut self, dep: &Dependency, kind: QueryKind, f: &mut dyn FnMut(Summary) ) -> Poll<CargoResult<()>>

Attempt to find the packages that match a dependency request.

source

fn describe_source(&self, source: SourceId) -> String

source

fn is_replaced(&self, source: SourceId) -> bool

source

fn block_until_ready(&mut self) -> CargoResult<()>

Block until all outstanding Poll::Pending requests are Poll::Ready.

Provided Methods§

source

fn query_vec( &mut self, dep: &Dependency, kind: QueryKind ) -> Poll<CargoResult<Vec<Summary>>>

Implementors§

source§

impl<'cfg> Registry for PackageRegistry<'cfg>