pub struct ObjectMatchRuleBuilder {
states: StateSet,
states_mt: MatchType,
attr: HashMap<String, String>,
attr_mt: MatchType,
roles: Vec<Role>,
roles_mt: MatchType,
ifaces: InterfaceSet,
ifaces_mt: MatchType,
invert: bool,
}Expand description
The ‘builder’ type for MatchRule.
Use its methods to set match criteria.
Fields§
§states: StateSet§states_mt: MatchType§attr: HashMap<String, String>§attr_mt: MatchType§roles: Vec<Role>§roles_mt: MatchType§ifaces: InterfaceSet§ifaces_mt: MatchType§invert: boolImplementations§
Source§impl ObjectMatchRuleBuilder
impl ObjectMatchRuleBuilder
Sourcepub fn states<I>(self, states: I, mt: MatchType) -> ObjectMatchRuleBuilder
pub fn states<I>(self, states: I, mt: MatchType) -> ObjectMatchRuleBuilder
Insert a StateSet to the builder
Sourcepub fn attributes(
self,
attributes: HashMap<String, String>,
mt: MatchType,
) -> ObjectMatchRuleBuilder
pub fn attributes( self, attributes: HashMap<String, String>, mt: MatchType, ) -> ObjectMatchRuleBuilder
Insert a map of attributes
Sourcepub fn roles(self, roles: &[Role], mt: MatchType) -> ObjectMatchRuleBuilder
pub fn roles(self, roles: &[Role], mt: MatchType) -> ObjectMatchRuleBuilder
Insert a slice of Roles
Sourcepub fn interfaces<I>(
self,
interfaces: I,
mt: MatchType,
) -> ObjectMatchRuleBuilder
pub fn interfaces<I>( self, interfaces: I, mt: MatchType, ) -> ObjectMatchRuleBuilder
Insert an InterfaceSet from a collection of Interfaces
Sourcepub fn invert(self, invert: bool) -> ObjectMatchRuleBuilder
pub fn invert(self, invert: bool) -> ObjectMatchRuleBuilder
Sets the inversion of the MatchRule, defaults to false, no inversion.
Sourcepub fn build(self) -> ObjectMatchRule
pub fn build(self) -> ObjectMatchRule
Builds the ObjectMatchRule
Trait Implementations§
Source§impl Clone for ObjectMatchRuleBuilder
impl Clone for ObjectMatchRuleBuilder
Source§fn clone(&self) -> ObjectMatchRuleBuilder
fn clone(&self) -> ObjectMatchRuleBuilder
Returns a duplicate 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 moreSource§impl Debug for ObjectMatchRuleBuilder
impl Debug for ObjectMatchRuleBuilder
Source§impl Default for ObjectMatchRuleBuilder
impl Default for ObjectMatchRuleBuilder
Source§fn default() -> ObjectMatchRuleBuilder
fn default() -> ObjectMatchRuleBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ObjectMatchRuleBuilder
impl RefUnwindSafe for ObjectMatchRuleBuilder
impl Send for ObjectMatchRuleBuilder
impl Sync for ObjectMatchRuleBuilder
impl Unpin for ObjectMatchRuleBuilder
impl UnwindSafe for ObjectMatchRuleBuilder
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