Struct cargo::core::package::Package [−][src]
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.
Implementations
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]
fn hash<H: Hasher>(&self, into: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Package
[src]
fn cmp(&self, other: &Package) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Package> for Package
[src]
fn eq(&self, other: &Package) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Package> for Package
[src]
fn partial_cmp(&self, other: &Package) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,