pub struct Category {
pub stop_on_first: bool,
pub rules: Vec<Rule>,
}Expand description
A category containing multiple rules with evaluation settings.
§Fields
stop_on_first: Iftrue, evaluation stops after the first matching rulerules: List of rules (automatically sorted by priority during deserialization)
§Priority Sorting
Rules are sorted by priority (lower value = higher precedence) when deserialized.
Fields§
§stop_on_first: bool§rules: Vec<Rule>Implementations§
Source§impl Category
impl Category
Sourcepub fn warn_duplicate_priorities(&self, category_name: &str)
pub fn warn_duplicate_priorities(&self, category_name: &str)
Checks for rules with duplicate priorities and logs warnings.
Duplicate priorities may result in non-deterministic evaluation order for rules with the same priority value.
§Arguments
category_name- Name of the category (for logging)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Category
impl<'de> Deserialize<'de> for Category
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Category
impl RefUnwindSafe for Category
impl Send for Category
impl Sync for Category
impl Unpin for Category
impl UnwindSafe for Category
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