archunit/slices/fluentapi/
negative_slice_condition_builder.rsuse super::{ForbiddenSliceDependencyCondition, SliceScopeBuilder};
#[derive(Debug, Clone)]
#[must_use = "a slice-rule mood has no effect until it receives a condition"]
pub struct NegativeSliceConditionBuilder {
scope: SliceScopeBuilder,
}
impl NegativeSliceConditionBuilder {
pub(super) const fn new(scope: SliceScopeBuilder) -> Self {
Self { scope }
}
pub fn contain_dependency(
self,
source_slice: impl Into<String>,
target_slice: impl Into<String>,
) -> ForbiddenSliceDependencyCondition {
ForbiddenSliceDependencyCondition::new(self.scope, source_slice.into(), target_slice.into())
}
pub const fn scope(&self) -> &SliceScopeBuilder {
&self.scope
}
}