#[non_exhaustive]pub struct Package {
pub name: String,
pub version: Version,
pub root: Option<PathBuf>,
pub auto_bins: bool,
pub auto_tests: bool,
pub auto_examples: bool,
pub auto_benches: bool,
}
Available on crate feature
workspace
only.Expand description
A single package.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.name: String
The name of the package.
version: Version
The version of the package..
root: Option<PathBuf>
The root of the package.
auto_bins: bool
Automatically detect binaries.
auto_tests: bool
Automatically detect tests.
auto_examples: bool
Automatically detect examples.
auto_benches: bool
Automatically detect benches.
Implementations§
Source§impl Package
impl Package
Sourcepub fn find_all(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_all(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find every single entrypoint available.
Sourcepub fn find_bins(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_bins(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find all binaries matching the given name in the workspace.
Sourcepub fn find_tests(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_tests(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find all tests associated with the given base name.
Sourcepub fn find_examples(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_examples(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find all examples matching the given name in the workspace.
Sourcepub fn find_benches(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
pub fn find_benches(&self, m: WorkspaceFilter<'_>) -> Result<Vec<Found>>
Find all benches matching the given name in the workspace.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Package
impl RefUnwindSafe for Package
impl Send for Package
impl Sync for Package
impl Unpin for Package
impl UnwindSafe for Package
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more