pub struct DisciplineRule { /* private fields */ }Expand description
One assignment: sources whose field has a value matching pattern
play discipline.
Implementations§
Source§impl DisciplineRule
impl DisciplineRule
Sourcepub fn new(
field: SourceField,
pattern: impl Into<String>,
discipline: Discipline,
) -> Result<Self, DisciplineMapError>
pub fn new( field: SourceField, pattern: impl Into<String>, discipline: Discipline, ) -> Result<Self, DisciplineMapError>
An assignment by a wildcard pattern over the whole value, compared
case-sensitively, as the like operator compares.
§Errors
A pattern that is empty or ends in a lone backslash.
Sourcepub fn field(&self) -> SourceField
pub fn field(&self) -> SourceField
The metadata field the pattern reads.
Sourcepub fn discipline(&self) -> &Discipline
pub fn discipline(&self) -> &Discipline
The discipline a matching source plays.
Trait Implementations§
Source§impl Clone for DisciplineRule
impl Clone for DisciplineRule
Source§impl Debug for DisciplineRule
impl Debug for DisciplineRule
Auto Trait Implementations§
impl Freeze for DisciplineRule
impl RefUnwindSafe for DisciplineRule
impl Send for DisciplineRule
impl Sync for DisciplineRule
impl Unpin for DisciplineRule
impl UnsafeUnpin for DisciplineRule
impl UnwindSafe for DisciplineRule
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