pub struct PkgMeta {
pub id: String,
pub name: String,
pub version: String,
pub manifest_path: String,
pub targets: Vec<Target>,
}Expand description
One package as cargo metadata reports it (the subset a survey needs).
Fields§
§id: StringOpaque package id (the metadata graph key).
name: StringCrate name.
version: StringResolved version.
manifest_path: StringAbsolute path to the package’s Cargo.toml.
targets: Vec<Target>The package’s build targets.
Implementations§
Source§impl PkgMeta
impl PkgMeta
Sourcepub fn src_root(&self) -> Option<PathBuf>
pub fn src_root(&self) -> Option<PathBuf>
The primary source root for module bucketing: the directory of the lib
target’s entry file, else the first bin, else the first target. None
when no target carries a source path.
Sourcepub fn test_targets(&self) -> u64
pub fn test_targets(&self) -> u64
Authoritative count of cargo test targets (a kind of test).
Sourcepub fn bench_targets(&self) -> u64
pub fn bench_targets(&self) -> u64
Authoritative count of cargo bench targets (a kind of bench).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PkgMeta
impl RefUnwindSafe for PkgMeta
impl Send for PkgMeta
impl Sync for PkgMeta
impl Unpin for PkgMeta
impl UnsafeUnpin for PkgMeta
impl UnwindSafe for PkgMeta
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