pub struct Criterion {
pub text: String,
pub required: bool,
pub weight: f32,
pub id: Option<String>,
pub machine_checkable: Option<bool>,
}Fields§
§text: String§required: bool§weight: f32§id: Option<String>I3.3 (A4): optional stable id from the host’s contract layer; threaded to VerdictFn.
machine_checkable: Option<bool>I3.3 (A4): host hint — host has a deterministic check for this criterion.
Implementations§
Source§impl Criterion
impl Criterion
pub fn required(text: impl Into<String>) -> Self
pub fn optional(text: impl Into<String>) -> Self
pub fn with_weight(self, w: f32) -> Self
Sourcepub fn with_id(self, id: impl Into<String>) -> Self
pub fn with_id(self, id: impl Into<String>) -> Self
I3.3 (A4): attach a stable identifier so VerdictFn can dispatch per-criterion checks.
Sourcepub fn machine_checkable(self, on: bool) -> Self
pub fn machine_checkable(self, on: bool) -> Self
I3.3 (A4): mark this criterion as host-checkable (deterministic) for VerdictFn dispatch.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Criterion
impl RefUnwindSafe for Criterion
impl Send for Criterion
impl Sync for Criterion
impl Unpin for Criterion
impl UnsafeUnpin for Criterion
impl UnwindSafe for Criterion
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