Package

Struct Package 

Source
pub struct Package<'p> { /* private fields */ }
Expand description

The package information.

Implementations§

Source§

impl<'p> Package<'p>

Source

pub fn name(&self) -> &str

The package name.

Source

pub fn version(&self) -> Option<WorkspaceInheritable<&str>>

The package version.

Source

pub fn edition(&self) -> Option<&WorkspaceInheritable<RustEdition>>

The Rust edition.

Source

pub fn rust_version(&self) -> Option<WorkspaceInheritable<&str>>

The required Rust version.

Source

pub fn authors( &self, ) -> Option<WorkspaceInheritable<impl Iterator<Item = &Author<'_>>>>

The list of authors.

Source

pub fn description(&self) -> Option<WorkspaceInheritable<&str>>

The package description.

Source

pub fn documentation(&self) -> Option<WorkspaceInheritable<&str>>

The package documentation URL.

Source

pub fn readme(&self) -> Option<WorkspaceInheritable<&str>>

The path to the README file.

Source

pub fn homepage(&self) -> Option<WorkspaceInheritable<&str>>

The package homepage URL.

Source

pub fn repository(&self) -> Option<WorkspaceInheritable<&str>>

The package repository URL.

Source

pub fn license(&self) -> Option<WorkspaceInheritable<&str>>

The package license.

Source

pub fn license_file(&self) -> Option<WorkspaceInheritable<&str>>

The path to the license file.

Source

pub fn keywords( &self, ) -> Option<WorkspaceInheritable<impl Iterator<Item = &str>>>

The package keywords.

Source

pub fn categories( &self, ) -> Option<WorkspaceInheritable<impl Iterator<Item = &str>>>

The package categories.

Source

pub fn workspace(&self) -> Option<&str>

The workspace path.

Source

pub fn build(&self) -> Option<&str>

The build script path.

The package links.

Source

pub fn publish(&self) -> Option<WorkspaceInheritable<bool>>

Whether the package should be published.

Source

pub fn metadata(&self) -> Option<&Table<'p>>

The package metadata.

Source

pub fn include( &self, ) -> Option<WorkspaceInheritable<impl Iterator<Item = &str>>>

The paths to include.

Source

pub fn exclude( &self, ) -> Option<WorkspaceInheritable<impl Iterator<Item = &str>>>

The paths to exclude.

Source

pub fn default_run(&self) -> Option<&str>

The default run command.

Source

pub fn autobins(&self) -> Option<bool>

Whether to automatically build binaries.

Source

pub fn autoexamples(&self) -> Option<bool>

Whether to automatically build examples.

Source

pub fn autotests(&self) -> Option<bool>

Whether to automatically build tests.

Source

pub fn autobenches(&self) -> Option<bool>

Whether to automatically build benchmarks.

Source

pub fn resolver(&self) -> Option<ResolverVersion>

The resolver version.

Trait Implementations§

Source§

impl<'p> Clone for Package<'p>

Source§

fn clone(&self) -> Package<'p>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'p> Debug for Package<'p>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de: 'p, 'p> Deserialize<'de> for Package<'p>

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<'p> PartialEq for Package<'p>

Source§

fn eq(&self, other: &Package<'p>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'p> StructuralPartialEq for Package<'p>

Auto Trait Implementations§

§

impl<'p> Freeze for Package<'p>

§

impl<'p> RefUnwindSafe for Package<'p>

§

impl<'p> Send for Package<'p>

§

impl<'p> Sync for Package<'p>

§

impl<'p> Unpin for Package<'p>

§

impl<'p> UnwindSafe for Package<'p>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,