pub struct Workspace {
pub root: PathBuf,
pub members: Vec<PathBuf>,
pub adapter: String,
pub shared_metadata: IndexMap<String, String>,
}Expand description
Typed workspace root + the IDs of every member package contained in it.
Fields§
§root: PathBuf§members: Vec<PathBuf>Member packages — relative paths from root.
adapter: StringAdapter that produced this workspace ("cargo", "npm", …).
Shared workspace-level metadata that members inherit when
they don’t override it (Cargo workspace.package,
Composer monorepo, …).
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn new(
root: impl Into<PathBuf>,
members: Vec<PathBuf>,
adapter: impl Into<String>,
) -> Self
pub fn new( root: impl Into<PathBuf>, members: Vec<PathBuf>, adapter: impl Into<String>, ) -> Self
Convenience constructor for the common case (no shared metadata).
Sourcepub fn single_package(
root: impl Into<PathBuf>,
adapter: impl Into<String>,
) -> Self
pub fn single_package( root: impl Into<PathBuf>, adapter: impl Into<String>, ) -> Self
Single-package workspace shape (e.g. a single-crate cargo
repo). Members is [root].
Sourcepub fn is_multi_package(&self) -> bool
pub fn is_multi_package(&self) -> bool
True if this workspace has multiple member packages.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Workspace
impl<'de> Deserialize<'de> for Workspace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Workspace
impl StructuralPartialEq for Workspace
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.