Module cargo::core::source

source ·
Expand description

Fundamental types and traits for sources of Cargo packages.

A source is a provider that contains source files and metadata of packages. It provides a number of methods to fetch those package informations, for example, querying metadata or downloading files for a package. These informations then can be used as dependencies for other Cargo packages.

Notably, this module contains

  • Source trait as an abstraction of different sources
  • SourceMap struct as a map of all available sources
  • SourceId struct as an unique identifier for a certain source

For implementations of Source trait, see crate::sources.

Structs

Enums

  • Information to find a specific commit in a Git repository.
  • A download status that represents if a Package has already been downloaded, or if not then a location to download.
  • Defines how a dependency query will be performed for a Source.

Traits

  • An abstraction of different sources of Cargo packages.