Ok(pkg)
}
+ /// Get the manifest dependencies
pub fn dependencies(&self) -> &[Dependency] { self.manifest.dependencies() }
+ /// Get the manifest
pub fn manifest(&self) -> &Manifest { &self.manifest }
+ /// Get the path to the manifest
pub fn manifest_path(&self) -> &Path { &self.manifest_path }
+ /// Get the name of the package
pub fn name(&self) -> &str { self.package_id().name() }
+ /// Get the PackageId object for the package (fully defines a packge)
pub fn package_id(&self) -> &PackageId { self.manifest.package_id() }
+ /// Get the root folder of the package
pub fn root(&self) -> &Path { self.manifest_path.parent().unwrap() }
+ /// Get the summary for the package
pub fn summary(&self) -> &Summary { self.manifest.summary() }
+ /// Get the targets specified in the manifest
pub fn targets(&self) -> &[Target] { self.manifest.targets() }
+ /// Get the current package version
pub fn version(&self) -> &Version { self.package_id().version() }
+ /// Get the package authors
pub fn authors(&self) -> &Vec<String> { &self.manifest.metadata().authors }
- pub fn publish(&self) -> bool { self.manifest.publish() }
+ /// Whether the package is set to publish
+ pub fn publish(&self) -> &Option<Vec<String>> { self.manifest.publish() }
+ /// Whether the package uses a custom build script for any target
pub fn has_custom_build(&self) -> bool {
self.targets().iter().any(|t| t.is_custom_build())
}