#[non_exhaustive]pub enum LevelRuleError {
EmptyPattern {
level: LineLevel,
},
TooManyRules {
count: usize,
limit: usize,
},
BadPattern {
pattern: String,
reason: String,
},
}Expand description
Why a LevelRule list was refused.
#[non_exhaustive]: shep-core is published, and a rule grammar that
grows a second kind of pattern would add a variant here with no version
to warn an out-of-tree match about it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyPattern
A rule’s pattern is empty. An empty regex matches every line, so the rule would claim the whole feed and leave every rule after it dead.
Fields
TooManyRules
More rules than this crate’s ceiling on how many one app may declare.
Each costs a compiled regex, and a client recompiles the whole list
on every redraw, so the count is a per-frame cost. limit carries
the ceiling rather than the doc naming a private const.
BadPattern
A pattern does not compile, or compiles to a program over the size bound this crate puts on a pattern it did not write.
Trait Implementations§
Source§impl Clone for LevelRuleError
impl Clone for LevelRuleError
Source§impl Debug for LevelRuleError
impl Debug for LevelRuleError
Source§impl Display for LevelRuleError
impl Display for LevelRuleError
impl Eq for LevelRuleError
Source§impl Error for LevelRuleError
impl Error for LevelRuleError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for LevelRuleError
impl PartialEq for LevelRuleError
impl StructuralPartialEq for LevelRuleError
Auto Trait Implementations§
impl Freeze for LevelRuleError
impl RefUnwindSafe for LevelRuleError
impl Send for LevelRuleError
impl Sync for LevelRuleError
impl Unpin for LevelRuleError
impl UnsafeUnpin for LevelRuleError
impl UnwindSafe for LevelRuleError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.