pub struct UnknownSeverity {
pub value: String,
pub expected: &'static [&'static str],
}Expand description
Raised when a producer emits a severity outside the vocabulary.
An unrecognised severity is a bug to surface, not a value to coerce to the lowest rank - coercion is how a finding silently stops blocking.
Fields§
§value: StringThe value that failed to parse.
expected: &'static [&'static str]The vocabulary that was expected.
Carried rather than hardcoded because two different scales parse into
this error: drep’s three-level Severity and the model-facing
five-level LlmSeverity. A fixed list meant a rejected "blocker"
from an LLM response reported “expected one of: info, warning, error” -
a vocabulary the parser does not accept and the model was never asked
for, which sends whoever reads it looking in the wrong place.
Trait Implementations§
Source§impl Clone for UnknownSeverity
impl Clone for UnknownSeverity
Source§fn clone(&self) -> UnknownSeverity
fn clone(&self) -> UnknownSeverity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnknownSeverity
impl Debug for UnknownSeverity
Source§impl Display for UnknownSeverity
impl Display for UnknownSeverity
impl Eq for UnknownSeverity
Source§impl Error for UnknownSeverity
impl Error for UnknownSeverity
1.30.0 · 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 PartialEq for UnknownSeverity
impl PartialEq for UnknownSeverity
impl StructuralPartialEq for UnknownSeverity
Auto Trait Implementations§
impl Freeze for UnknownSeverity
impl RefUnwindSafe for UnknownSeverity
impl Send for UnknownSeverity
impl Sync for UnknownSeverity
impl Unpin for UnknownSeverity
impl UnsafeUnpin for UnknownSeverity
impl UnwindSafe for UnknownSeverity
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
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
Compare self to
key and return true if they are equal.