[][src]Struct cargo::core::package::Package

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]

pub fn new(manifest: Manifest, manifest_path: &Path) -> Package[src]

Creates a package from a manifest and its location.

pub fn dependencies(&self) -> &[Dependency][src]

Gets the manifest dependencies.

pub fn manifest(&self) -> &Manifest[src]

Gets the manifest.

pub fn manifest_mut(&mut self) -> &mut Manifest[src]

Gets the manifest.

pub fn manifest_path(&self) -> &Path[src]

Gets the path to the manifest.

pub fn name(&self) -> InternedString[src]

Gets the name of the package.

pub fn package_id(&self) -> PackageId[src]

Gets the PackageId object for the package (fully defines a package).

pub fn root(&self) -> &Path[src]

Gets the root folder of the package.

pub fn summary(&self) -> &Summary[src]

Gets the summary for the package.

pub fn targets(&self) -> &[Target][src]

Gets the targets specified in the manifest.

pub fn version(&self) -> &Version[src]

Gets the current package version.

pub fn authors(&self) -> &Vec<String>[src]

Gets the package authors.

pub fn publish(&self) -> &Option<Vec<String>>[src]

Returns true if the package is set to publish.

pub fn has_custom_build(&self) -> bool[src]

Returns true if the package uses a custom build script for any target.

pub fn map_source(self, to_replace: SourceId, replace_with: SourceId) -> Package[src]

pub fn to_registry_toml(&self, config: &Config) -> CargoResult<String>[src]

pub fn include_lockfile(&self) -> bool[src]

Returns if package should include Cargo.lock.

Trait Implementations

impl Clone for Package[src]

impl Debug for Package[src]

impl Display for Package[src]

impl Eq for Package[src]

impl Hash for Package[src]

impl Ord for Package[src]

impl PartialEq<Package> for Package[src]

impl PartialOrd<Package> for Package[src]

impl Serialize for Package[src]

Auto Trait Implementations

impl !RefUnwindSafe for Package

impl !Send for Package

impl !Sync for Package

impl Unpin for Package

impl !UnwindSafe for Package

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.