pub struct SliceScopeBuilder { /* private fields */ }Expand description
Immutable scope describing how project files become named slices.
Implementations§
Source§impl SliceScopeBuilder
impl SliceScopeBuilder
Sourcepub fn defined_by(self, pattern: impl Into<PatternSpec>) -> Self
pub fn defined_by(self, pattern: impl Into<PatternSpec>) -> Self
Defines slice names through exactly one (**) path capture.
Sourcepub fn defined_by_regex(self, expression: impl Into<PatternSpec>) -> Self
pub fn defined_by_regex(self, expression: impl Into<PatternSpec>) -> Self
Defines slice names through the first capture in a Rust regular expression.
Sourcepub fn with_projection(self, projection: SliceProjection) -> Self
pub fn with_projection(self, projection: SliceProjection) -> Self
Uses a pre-built slice projection, including suffix and identity projections.
Sourcepub fn should_not(self) -> NegativeSliceConditionBuilder
pub fn should_not(self) -> NegativeSliceConditionBuilder
Enters the negated mood for forbidden slice dependencies.
Sourcepub fn should(self) -> PositiveSliceConditionBuilder
pub fn should(self) -> PositiveSliceConditionBuilder
Enters the positive mood for PlantUML diagram adherence.
Sourcepub fn to_plantuml(&self) -> Result<String, ArchUnitError>
pub fn to_plantuml(&self) -> Result<String, ArchUnitError>
Extracts the project and renders its current slices as deterministic PlantUML.
Sourcepub fn to_plantuml_with(
&self,
options: &CheckOptions,
) -> Result<String, ArchUnitError>
pub fn to_plantuml_with( &self, options: &CheckOptions, ) -> Result<String, ArchUnitError>
Renders PlantUML with explicit extraction options.
Sourcepub fn export_as_plantuml(
&self,
output_path: impl AsRef<Path>,
) -> Result<(), ArchUnitError>
pub fn export_as_plantuml( &self, output_path: impl AsRef<Path>, ) -> Result<(), ArchUnitError>
Extracts once and exports the current slices as UTF-8 PlantUML.
Sourcepub fn export_as_plantuml_with(
&self,
output_path: impl AsRef<Path>,
options: &CheckOptions,
) -> Result<(), ArchUnitError>
pub fn export_as_plantuml_with( &self, output_path: impl AsRef<Path>, options: &CheckOptions, ) -> Result<(), ArchUnitError>
Exports PlantUML with explicit extraction options.
Sourcepub const fn project_locator(&self) -> &ProjectLocator
pub const fn project_locator(&self) -> &ProjectLocator
Returns where Cargo project discovery begins.
Sourcepub const fn projection(&self) -> &SliceProjection
pub const fn projection(&self) -> &SliceProjection
Returns the immutable file-to-slice projection.
Trait Implementations§
Source§impl Clone for SliceScopeBuilder
impl Clone for SliceScopeBuilder
Source§fn clone(&self) -> SliceScopeBuilder
fn clone(&self) -> SliceScopeBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SliceScopeBuilder
impl RefUnwindSafe for SliceScopeBuilder
impl Send for SliceScopeBuilder
impl Sync for SliceScopeBuilder
impl Unpin for SliceScopeBuilder
impl UnwindSafe for SliceScopeBuilder
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