#[non_exhaustive]pub struct Package {
pub name: String,
pub version: Version,
pub root: Option<PathBuf>,
pub auto_bins: bool,
pub auto_libs: bool,
pub auto_tests: bool,
pub auto_examples: bool,
pub auto_benches: bool,
pub dependencies: Vec<Dependency>,
pub declarations: Vec<PathBuf>,
}workspace only.Expand description
A single package.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe name of the package.
version: VersionThe version of the package..
root: Option<PathBuf>The root of the package.
auto_bins: boolAutomatically detect binaries.
auto_libs: boolAutomatically detect libraries.
auto_tests: boolAutomatically detect tests.
auto_examples: boolAutomatically detect examples.
auto_benches: boolAutomatically detect benches.
dependencies: Vec<Dependency>The packages named in [dependencies].
declarations: Vec<PathBuf>The declaration sources (*.d.rn) of the package itself and of every
package it depends on, directly or not, each once. These are compiled
beside each of the package’s entry points.
Implementations§
Source§impl Package
impl Package
Sourcepub fn find_all(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_all(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find every single entrypoint available.
Sourcepub fn find_bins(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_bins(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find all binaries matching the given name in the package.
Sourcepub fn find_lib(&self, filter: WorkspaceFilter<'_>) -> Result<Option<Found>>
pub fn find_lib(&self, filter: WorkspaceFilter<'_>) -> Result<Option<Found>>
Find a library entry point matching the given name in the package, if one exists.
Sourcepub fn find_tests(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_tests(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find all tests associated with the given base name.
Sourcepub fn find_examples(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_examples(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find all examples matching the given name in the package.
Sourcepub fn find_benches(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_benches(&self, filter: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find all benches matching the given name in the workspace.