Struct cargo::core::package::Package
[−]
[src]
pub struct Package { /* fields omitted */ }
Information about a package that is available somewhere in the file system.
A package is a Cargo.toml
file plus all the files that are part of it.
Methods
impl Package
[src]
fn new(manifest: Manifest, manifest_path: &Path) -> Package
fn for_path(manifest_path: &Path, config: &Config) -> CargoResult<Package>
fn dependencies(&self) -> &[Dependency]
fn manifest(&self) -> &Manifest
fn manifest_path(&self) -> &Path
fn name(&self) -> &str
fn package_id(&self) -> &PackageId
fn root(&self) -> &Path
fn summary(&self) -> &Summary
fn targets(&self) -> &[Target]
fn version(&self) -> &Version
fn publish(&self) -> bool
fn has_custom_build(&self) -> bool
fn find_closest_target(
&self,
target: &str,
is_expected_kind: fn(_: &Target) -> bool
) -> Option<&Target>
&self,
target: &str,
is_expected_kind: fn(_: &Target) -> bool
) -> Option<&Target>
fn map_source(self, to_replace: &SourceId, replace_with: &SourceId) -> Package
fn to_registry_toml(&self) -> String
Trait Implementations
impl Clone for Package
[src]
fn clone(&self) -> Package
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Serialize for Package
[src]
fn serialize<S>(&self, s: S) -> Result<S::Ok, S::Error> where
S: Serializer,
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Display for Package
[src]
impl PartialEq for Package
[src]
fn eq(&self, other: &Package) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.