pub struct ProbeResult {
pub id: String,
pub label: String,
pub group: Group,
pub status: Status,
pub weight: u32,
pub neutral: bool,
pub summary: String,
pub findings: Vec<String>,
pub metrics: BTreeMap<String, Value>,
pub duration_ms: u64,
pub evidence: Option<String>,
}Fields§
§id: String§label: String§group: Group§status: Status§weight: u32Relative importance inside the weighted score.
neutral: boolNeutral probes gather evidence for the verdict but never move the score.
summary: String§findings: Vec<String>§metrics: BTreeMap<String, Value>§duration_ms: u64§evidence: Option<String>Implementations§
Source§impl ProbeResult
impl ProbeResult
pub fn new(id: &str, label: &str, group: Group) -> Self
pub fn weight(self, w: u32) -> Self
pub fn neutral(self) -> Self
pub fn pass(self, summary: impl Into<String>) -> Self
pub fn warn(self, summary: impl Into<String>) -> Self
pub fn fail(self, summary: impl Into<String>) -> Self
pub fn skip(self, summary: impl Into<String>) -> Self
pub fn error(self, summary: impl Into<String>) -> Self
pub fn finding(self, f: impl Into<String>) -> Self
pub fn metric(self, k: &str, v: impl Into<Value>) -> Self
pub fn evidence(self, e: impl Into<String>) -> Self
pub fn took(self, ms: u64) -> Self
pub fn metric_f64(&self, k: &str) -> Option<f64>
pub fn metric_bool(&self, k: &str) -> Option<bool>
Trait Implementations§
Source§impl Clone for ProbeResult
impl Clone for ProbeResult
Source§fn clone(&self) -> ProbeResult
fn clone(&self) -> ProbeResult
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 ProbeResult
impl Debug for ProbeResult
Source§impl<'de> Deserialize<'de> for ProbeResult
impl<'de> Deserialize<'de> for ProbeResult
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 ProbeResult
impl RefUnwindSafe for ProbeResult
impl Send for ProbeResult
impl Sync for ProbeResult
impl Unpin for ProbeResult
impl UnsafeUnpin for ProbeResult
impl UnwindSafe for ProbeResult
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