pub struct Workspace { /* private fields */ }Expand description
The target cargo workspace, resolved once via cargo metadata, and the
source for per-binary discovery.
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn load(manifest_path: &Path) -> Result<Self, ProjectError>
pub fn load(manifest_path: &Path) -> Result<Self, ProjectError>
Run cargo metadata for the workspace containing manifest_path.
Sourcepub fn projects(
&self,
overrides: &Overrides,
) -> Result<Vec<Project>, ProjectError>
pub fn projects( &self, overrides: &Overrides, ) -> Result<Vec<Project>, ProjectError>
One project per published binary, named after the binary, selected like
cargo build.
The package set is the default-members (or all members), or the explicit
--package/--workspace set, minus --exclude and minus
publish = false crates (kept only when named explicitly). Each selected
package contributes all its binaries, or just those named by --bin. A
member’s [package.metadata.npmgen] inherits [workspace.metadata.npmgen]
and is parsed only when the member actually ships a binary, so an
unrelated member’s malformed config never aborts the run.
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnsafeUnpin for Workspace
impl UnwindSafe for Workspace
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