pub struct Workspace { /* private fields */ }Expand description
Represents a workspace in a monorepo.
Implementations§
Source§impl Workspace
impl Workspace
Sourcepub fn with_scripts(
name: impl Into<String>,
path: impl Into<PathBuf>,
scripts: Vec<Script>,
) -> Self
pub fn with_scripts( name: impl Into<String>, path: impl Into<PathBuf>, scripts: Vec<Script>, ) -> Self
Create a new workspace with scripts.
Sourcepub fn set_scripts(&mut self, scripts: Vec<Script>)
pub fn set_scripts(&mut self, scripts: Vec<Script>)
Set the workspace scripts.
Sourcepub fn has_scripts(&self) -> bool
pub fn has_scripts(&self) -> bool
Check if the workspace has scripts.
Sourcepub fn load_scripts(&mut self) -> Result<()>
pub fn load_scripts(&mut self) -> Result<()>
Load scripts from the workspace’s package.json.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin 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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more