pub struct Diagnostic {
pub code: &'static str,
pub severity: Severity,
pub frame: Option<u32>,
pub time: Option<f64>,
pub params: Vec<(&'static str, f64)>,
pub canvas: Option<String>,
pub confidence: Option<f64>,
pub region: Option<Rect>,
pub detail: Option<Value>,
}Expand description
One diagnostic event. frame/time locate a per-frame finding; params are the catalogue’s {{name}} values,
in the order the message uses them. canvas, confidence, region and detail are the row’s own fields of
those names, when it has them.
Fields§
§code: &'static str§severity: Severity§frame: Option<u32>§time: Option<f64>§params: Vec<(&'static str, f64)>§canvas: Option<String>§confidence: Option<f64>§region: Option<Rect>§detail: Option<Value>Implementations§
Source§impl Diagnostic
impl Diagnostic
pub fn new(code: &'static str, severity: Severity) -> Diagnostic
pub fn at(self, frame: u32, time: f64) -> Diagnostic
pub fn param(self, name: &'static str, value: f64) -> Diagnostic
pub fn canvas(self, canvas: &str) -> Diagnostic
pub fn confidence(self, confidence: f64) -> Diagnostic
pub fn region(self, region: Rect) -> Diagnostic
pub fn detail(self, detail: Value) -> Diagnostic
Trait Implementations§
Source§impl Clone for Diagnostic
impl Clone for Diagnostic
Source§impl Debug for Diagnostic
impl Debug for Diagnostic
Source§impl PartialEq for Diagnostic
impl PartialEq for Diagnostic
impl StructuralPartialEq for Diagnostic
Auto Trait Implementations§
impl Freeze for Diagnostic
impl RefUnwindSafe for Diagnostic
impl Send for Diagnostic
impl Sync for Diagnostic
impl Unpin for Diagnostic
impl UnsafeUnpin for Diagnostic
impl UnwindSafe for Diagnostic
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more