#[non_exhaustive]pub struct CargoProject { /* private fields */ }Expand description
Cargo’s authoritative description of the selected workspace.
Implementations§
Source§impl CargoProject
impl CargoProject
Sourcepub fn manifest_path(&self) -> &Path
pub fn manifest_path(&self) -> &Path
Returns the workspace manifest, including for a virtual workspace.
Sourcepub fn target_directory(&self) -> &Path
pub fn target_directory(&self) -> &Path
Returns Cargo’s configured build-output directory.
Sourcepub fn member_roots(&self) -> impl ExactSizeIterator<Item = &Path>
pub fn member_roots(&self) -> impl ExactSizeIterator<Item = &Path>
Returns the absolute roots of workspace member packages in deterministic order.
Sourcepub fn targets(&self) -> &[CargoTarget]
pub fn targets(&self) -> &[CargoTarget]
Returns all target roots Cargo reported, including development-only targets.
Sourcepub fn source_targets(
&self,
options: SourceOptions,
) -> impl Iterator<Item = &CargoTarget>
pub fn source_targets( &self, options: SourceOptions, ) -> impl Iterator<Item = &CargoTarget>
Returns target roots selected by the source analysis options.
Trait Implementations§
Source§impl Clone for CargoProject
impl Clone for CargoProject
Source§fn clone(&self) -> CargoProject
fn clone(&self) -> CargoProject
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CargoProject
impl Debug for CargoProject
Source§impl Hash for CargoProject
impl Hash for CargoProject
Source§impl Ord for CargoProject
impl Ord for CargoProject
Source§fn cmp(&self, other: &CargoProject) -> Ordering
fn cmp(&self, other: &CargoProject) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CargoProject
impl PartialEq for CargoProject
Source§impl PartialOrd for CargoProject
impl PartialOrd for CargoProject
impl Eq for CargoProject
impl StructuralPartialEq for CargoProject
Auto Trait Implementations§
impl Freeze for CargoProject
impl RefUnwindSafe for CargoProject
impl Send for CargoProject
impl Sync for CargoProject
impl Unpin for CargoProject
impl UnwindSafe for CargoProject
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.