pub struct FilterConfig {
pub include: RuleFilterConfig,
pub exclude: RuleFilterConfig,
/* private fields */
}Expand description
Include/exclude filter configuration for diagnostics.
If include filters are non-empty, a diagnostic must match at least one. Any diagnostic matching an exclude filter is removed regardless.
Fields§
§include: RuleFilterConfig§exclude: RuleFilterConfigImplementations§
Source§impl FilterConfig
impl FilterConfig
pub fn new(include: RuleFilterConfig, exclude: RuleFilterConfig) -> Self
pub fn is_empty(&self) -> bool
pub fn matches_rule( &self, rule_id: &str, category: Option<&str>, resource_id: Option<&str>, resource_type: Option<&str>, logical_id: Option<&str>, entity_type: Option<EntityType>, ) -> bool
pub fn excluded_categories(&self) -> HashSet<&str>
Sourcepub fn invalid_patterns(&self) -> Vec<String>
pub fn invalid_patterns(&self) -> Vec<String>
Every id_patterns entry (from either the include or exclude filter) that is not a valid
regular expression. Callers should surface these rather than let them be silently discarded:
a dropped include pattern in particular would otherwise filter out every diagnostic, because
the include set is treated as non-empty yet matches nothing.
Trait Implementations§
Source§impl Clone for FilterConfig
impl Clone for FilterConfig
Source§impl Debug for FilterConfig
impl Debug for FilterConfig
Source§impl Default for FilterConfig
impl Default for FilterConfig
Source§fn default() -> FilterConfig
fn default() -> FilterConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FilterConfig
impl<'de> Deserialize<'de> for FilterConfig
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 FilterConfig
impl RefUnwindSafe for FilterConfig
impl Send for FilterConfig
impl Sync for FilterConfig
impl Unpin for FilterConfig
impl UnsafeUnpin for FilterConfig
impl UnwindSafe for FilterConfig
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