[][src]Struct guppy::graph::Workspace

pub struct Workspace { /* fields omitted */ }

Information about a workspace, parsed from metadata returned by cargo metadata.

For more about workspaces, see Cargo Workspaces in The Rust Programming Language.

Methods

impl Workspace[src]

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

Returns the workspace root.

pub fn members(
    &self
) -> impl Iterator<Item = (&Path, &PackageId)> + ExactSizeIterator
[src]

Returns an iterator over of workspace paths and members, sorted by the path they're in.

pub fn member_ids(&self) -> impl Iterator<Item = &PackageId> + ExactSizeIterator[src]

Returns an iterator over package IDs for workspace members. The package IDs will be returned in the same order as members, sorted by the path they're in.

pub fn member_by_path(&self, path: impl AsRef<Path>) -> Option<&PackageId>[src]

Maps the given path to the corresponding workspace member.

Trait Implementations

impl Clone for Workspace[src]

impl Debug for Workspace[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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