pub struct Spec {
pub requires: Vec<Condition>,
pub maintains: Vec<Condition>,
pub ensures: Vec<ConditionClosure>,
}
Expand description
A spec specifies the intended behavior of a function or method.
Fields§
§requires: Vec<Condition>
Preconditions: conditions that must hold when the function is called.
maintains: Vec<Condition>
Invariants: conditions that must hold both when the function is called and when it returns.
ensures: Vec<ConditionClosure>
Postconditions: conditions that must hold when the function returns.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Spec
impl RefUnwindSafe for Spec
impl !Send for Spec
impl !Sync for Spec
impl Unpin for Spec
impl UnwindSafe for Spec
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