pub enum FindingLevel {
Off,
Info,
Warning,
Error,
}Expand description
How loudly one judgement is reported, including not at all.
Off is a value and not an absence: a repository that has decided a check does not
apply to it has made a decision, and a decision is worth being able to read back.
use majordomus_cli::commit::FindingLevel;
// a repository that has turned a check off has made a decision, and it reads back
let off: FindingLevel = serde_json::from_str("\"off\"").expect("a level");
assert_eq!(off, FindingLevel::Off);
assert_eq!(FindingLevel::default(), FindingLevel::Warning);Variants§
Off
Never reported.
Info
Reported; changes no verdict.
Warning
Reported; the verdict is still a pass.
Error
Reported; the verdict fails.
Implementations§
Source§impl FindingLevel
impl FindingLevel
Sourcepub fn severity(self) -> Option<Severity>
pub fn severity(self) -> Option<Severity>
The severity a finding at this level carries, or None when it is not reported.
use majordomus_cli::commit::FindingLevel;
use majordomus_cli::Severity;
assert_eq!(FindingLevel::Off.severity(), None);
assert_eq!(FindingLevel::Error.severity(), Some(Severity::Error));Trait Implementations§
Source§impl Clone for FindingLevel
impl Clone for FindingLevel
Source§fn clone(&self) -> FindingLevel
fn clone(&self) -> FindingLevel
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 moreimpl Copy for FindingLevel
Source§impl Debug for FindingLevel
impl Debug for FindingLevel
Source§impl Default for FindingLevel
impl Default for FindingLevel
Source§fn default() -> FindingLevel
fn default() -> FindingLevel
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FindingLevel
impl<'de> Deserialize<'de> for FindingLevel
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
impl Eq for FindingLevel
Source§impl JsonSchema for FindingLevel
impl JsonSchema for FindingLevel
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for FindingLevel
impl PartialEq for FindingLevel
Source§fn eq(&self, other: &FindingLevel) -> bool
fn eq(&self, other: &FindingLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FindingLevel
impl Serialize for FindingLevel
impl StructuralPartialEq for FindingLevel
Auto Trait Implementations§
impl Freeze for FindingLevel
impl RefUnwindSafe for FindingLevel
impl Send for FindingLevel
impl Sync for FindingLevel
impl Unpin for FindingLevel
impl UnsafeUnpin for FindingLevel
impl UnwindSafe for FindingLevel
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.