pub struct ContractCheck { /* private fields */ }Expand description
One named check in a contract report.
§Examples
use qubit_fs_testkit::{ContractCheckOutcome, FileSystemContract, FileSystemContractSuite};
let fixture = RustdocSyncFixture::new();
let mut suite = FileSystemContractSuite::new(&fixture);
suite.run_contract(FileSystemContract::Properties);
let check = &suite.run().report().checks()[0];
assert!(matches!(check.outcome(), ContractCheckOutcome::Passed | ContractCheckOutcome::Failed { .. }));Implementations§
Source§impl ContractCheck
impl ContractCheck
Sourcepub const fn id(&self) -> ContractCheckId
pub const fn id(&self) -> ContractCheckId
Returns the stable check identifier.
Sourcepub const fn capability(&self) -> Option<FileSystemCapability>
pub const fn capability(&self) -> Option<FileSystemCapability>
Returns the capability associated with this check, when one exists.
Sourcepub const fn outcome(&self) -> &ContractCheckOutcome
pub const fn outcome(&self) -> &ContractCheckOutcome
Returns the recorded check outcome.
Trait Implementations§
Source§impl Clone for ContractCheck
impl Clone for ContractCheck
Source§impl Debug for ContractCheck
impl Debug for ContractCheck
impl Eq for ContractCheck
Source§impl PartialEq for ContractCheck
impl PartialEq for ContractCheck
impl StructuralPartialEq for ContractCheck
Auto Trait Implementations§
impl Forget for ContractCheck
impl Freeze for ContractCheck
impl Move for ContractCheck
impl RefUnwindSafe for ContractCheck
impl Send for ContractCheck
impl Sync for ContractCheck
impl Unpin for ContractCheck
impl UnsafeUnpin for ContractCheck
impl UnwindSafe for ContractCheck
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