pub struct Polylith {
pub root: PathBuf,
pub top_namespace: String,
pub bases: Vec<Brick>,
pub components: Vec<Brick>,
pub projects: Vec<Brick>,
}Expand description
Polylith workspace configuration
Fields§
§root: PathBufWorkspace root
top_namespace: StringTop namespace for all bricks
bases: Vec<Brick>All bases
components: Vec<Brick>All components
projects: Vec<Brick>All projects
Implementations§
Source§impl Polylith
impl Polylith
Sourcepub fn init(root: &Path, top_namespace: &str) -> Result<Self>
pub fn init(root: &Path, top_namespace: &str) -> Result<Self>
Initialize a new Polylith workspace
Sourcepub fn is_polylith(root: &Path) -> bool
pub fn is_polylith(root: &Path) -> bool
Check if a directory is a Polylith workspace
Sourcepub fn create_brick(
&mut self,
brick_type: BrickType,
name: &str,
) -> Result<Brick>
pub fn create_brick( &mut self, brick_type: BrickType, name: &str, ) -> Result<Brick>
Create a new brick
Sourcepub fn create_project(
&mut self,
name: &str,
bases: &[String],
components: &[String],
) -> Result<Brick>
pub fn create_project( &mut self, name: &str, bases: &[String], components: &[String], ) -> Result<Brick>
Create a project that combines bases and components
Sourcepub fn all_bricks(&self) -> Vec<&Brick>
pub fn all_bricks(&self) -> Vec<&Brick>
Get all bricks
Sourcepub fn check_cycles(&self) -> Result<()>
pub fn check_cycles(&self) -> Result<()>
Check for dependency cycles
Sourcepub fn as_workspace(&self) -> Result<Workspace>
pub fn as_workspace(&self) -> Result<Workspace>
Get the workspace for this polylith
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Polylith
impl RefUnwindSafe for Polylith
impl Send for Polylith
impl Sync for Polylith
impl Unpin for Polylith
impl UnwindSafe for Polylith
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