pub struct True;Expand description
Trivially true proposition.
True is always established and can be used as a precondition for
unconstrained tools or as a postcondition for tools with no guarantees.
§Example
use elicitation::tool::True;
use elicitation::contracts::{Established, Prop};
// Tools with no preconditions use True
let no_constraint: Established<True> = True::axiom();
// Can call anytime
assert_eq!(std::mem::size_of_val(&no_constraint), 0);Implementations§
Source§impl True
impl True
Sourcepub fn axiom() -> Established<True>
pub fn axiom() -> Established<True>
Axiom: truth is always established.
This provides a proof of True without any preconditions.
Use this as the precondition proof for unconstrained tools.
§Example
use elicitation::tool::True;
let proof = True::axiom();
// Can pass this to any tool with Pre = TrueTrait Implementations§
Auto Trait Implementations§
impl Freeze for True
impl RefUnwindSafe for True
impl Send for True
impl Sync for True
impl Unpin for True
impl UnwindSafe for True
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