pub struct LayerDependencyRuleBuilder { /* private fields */ }Expand description
Immutable stage adding an allowlist or blocklist policy for one source layer.
Implementations§
Source§impl LayerDependencyRuleBuilder
impl LayerDependencyRuleBuilder
Sourcepub fn may_only_depend_on_layers(
self,
layer_names: &[&str],
) -> LayeredArchitecture
pub fn may_only_depend_on_layers( self, layer_names: &[&str], ) -> LayeredArchitecture
Allows dependencies only to the named layers.
Passing an empty slice seals the source layer against every cross-layer dependency.
Sourcepub fn may_not_depend_on_layers(
self,
layer_names: &[&str],
) -> LayeredArchitecture
pub fn may_not_depend_on_layers( self, layer_names: &[&str], ) -> LayeredArchitecture
Forbids dependencies to the named layers.
At least one target is required; an empty blocklist is a user error reported by check().
Sourcepub const fn architecture(&self) -> &LayeredArchitecture
pub const fn architecture(&self) -> &LayeredArchitecture
Returns the architecture accumulated before this policy stage.
Sourcepub fn layer_name(&self) -> &str
pub fn layer_name(&self) -> &str
Returns the source layer to which the next policy applies.
Trait Implementations§
Source§impl Clone for LayerDependencyRuleBuilder
impl Clone for LayerDependencyRuleBuilder
Source§fn clone(&self) -> LayerDependencyRuleBuilder
fn clone(&self) -> LayerDependencyRuleBuilder
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 LayerDependencyRuleBuilder
impl RefUnwindSafe for LayerDependencyRuleBuilder
impl Send for LayerDependencyRuleBuilder
impl Sync for LayerDependencyRuleBuilder
impl Unpin for LayerDependencyRuleBuilder
impl UnwindSafe for LayerDependencyRuleBuilder
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