pub struct Evaluation {
pub target: String,
pub outcome: Outcome,
}Expand description
Result of evaluating a check against a single target.
use scute_core::commit_message;
use scute_core::commit_message::Definition;
let results = commit_message::check("feat: add login", &Definition::default()).unwrap();
let eval = &results[0];
assert_eq!(eval.target, "feat: add login");
assert!(eval.is_pass());Fields§
§target: String§outcome: OutcomeImplementations§
Source§impl Evaluation
impl Evaluation
pub fn completed( target: impl Into<String>, observed: u64, thresholds: Thresholds, evidence: Vec<Evidence>, ) -> Self
pub fn errored(target: impl Into<String>, error: ExecutionError) -> Self
pub fn is_pass(&self) -> bool
pub fn is_warn(&self) -> bool
pub fn is_fail(&self) -> bool
pub fn is_error(&self) -> bool
Trait Implementations§
Source§impl Debug for Evaluation
impl Debug for Evaluation
Source§impl PartialEq for Evaluation
impl PartialEq for Evaluation
impl StructuralPartialEq for Evaluation
Auto Trait Implementations§
impl Freeze for Evaluation
impl RefUnwindSafe for Evaluation
impl Send for Evaluation
impl Sync for Evaluation
impl Unpin for Evaluation
impl UnsafeUnpin for Evaluation
impl UnwindSafe for Evaluation
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