#[non_exhaustive]pub enum PolicyError {
Show 18 variants
TomlParse(Error),
Io(Error),
UnknownClass(String),
BadRegex {
name: String,
source: Error,
},
TokenShapeShadow {
name: String,
pattern: String,
shadowed_shape: String,
},
BadDictionary {
name: String,
reason: String,
},
MissingTtl,
BadTtl(String),
NoRules,
NoDetectors,
LegacyDetectorUnsupported(&'static str),
NerLoad(String),
NerThresholdOutOfRange {
value: f32,
},
SessionScopeUnknown {
value: String,
},
NerLocaleUnsupported {
value: String,
},
BundledRulepackUnknown {
value: String,
},
UnknownLocaleBucket {
name: String,
},
UnsupportedRuleKind(String),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TomlParse(Error)
Io(Error)
UnknownClass(String)
BadRegex
TokenShapeShadow
BadDictionary
MissingTtl
BadTtl(String)
NoRules
NoDetectors
LegacyDetectorUnsupported(&'static str)
NerLoad(String)
NerThresholdOutOfRange
SessionScopeUnknown
NerLocaleUnsupported
BundledRulepackUnknown
UnknownLocaleBucket
UnsupportedRuleKind(String)
Trait Implementations§
Source§impl Debug for PolicyError
impl Debug for PolicyError
Source§impl Display for PolicyError
impl Display for PolicyError
Source§impl Error for PolicyError
impl Error for PolicyError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<PolicyError> for Error
impl From<PolicyError> for Error
Source§fn from(source: PolicyError) -> Self
fn from(source: PolicyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PolicyError
impl !RefUnwindSafe for PolicyError
impl Send for PolicyError
impl Sync for PolicyError
impl Unpin for PolicyError
impl UnsafeUnpin for PolicyError
impl !UnwindSafe for PolicyError
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