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

pub struct Workspace<'g> { /* fields omitted */ }
Expand description

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

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

Implementations

These parallel iterators require the rayon1 feature is enabled.

Returns a parallel iterator over package metadatas, sorted by workspace path.

Requires the rayon1 feature to be enabled.

Returns a parallel iterator over workspace paths and package metadatas, sorted by workspace paths.

Requires the rayon1 feature to be enabled.

Returns a parallel iterator over workspace names and package metadatas, sorted by package names.

Requires the rayon1 feature to be enabled.

Returns the workspace root.

Returns the number of packages in this workspace.

Returns true if the workspace contains a package by the given name.

Returns true if the workspace contains a package by the given workspace path.

Returns an iterator over package metadatas, sorted by the path they’re in.

Returns an iterator over workspace paths and package metadatas, sorted by the path they’re in.

Returns an iterator over workspace names and package metadatas, sorted by names.

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.

Maps the given path to the corresponding workspace member.

Returns an error if the path didn’t match any workspace members.

Maps the given paths to their corresponding workspace members, returning a new value of the specified collection type (e.g. Vec).

Returns an error if any of the paths were unknown.

Maps the given name to the corresponding workspace member.

Returns an error if the name didn’t match any workspace members.

Maps the given names to their corresponding workspace members, returning a new value of the specified collection type (e.g. Vec).

Returns an error if any of the paths were unknown.

Helpers for property testing

The methods in this section allow a Workspace to be used in property-based testing scenarios.

Currently, proptest 1 is supported if the proptest1 feature is enabled.

Returns a Strategy that generates random package names from this workspace.

Requires the proptest1 feature to be enabled.

Panics

Panics if there are no packages in this Workspace.

Returns a Strategy that generates random package IDs from this workspace.

Requires the proptest1 feature to be enabled.

Panics

Panics if there are no packages in this Workspace.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.