pub struct PhrasePredicate {
pub name: String,
pub is_invariant: bool,
pub expression: Expression,
}
Expand description
Represents a predicate that can be queried but not instantiated, e.g.,
Predicate vote-concluded When Not(Exists citizen : voter(citizen) && !has-voted(citizen)).
This includes invariants, which are checked after every derivation procedure and can trigger violations when becoming false, e.g.,
Invariant at-most-one-winner When Not(Exists winner, winner' : winner != winner').
Fields§
§name: String
The name of the predicate.
is_invariant: bool
Whether this indicate an invariant or not.
expression: Expression
The boolean expression checked by this predicate.
Trait Implementations§
Source§impl Clone for PhrasePredicate
impl Clone for PhrasePredicate
Source§fn clone(&self) -> PhrasePredicate
fn clone(&self) -> PhrasePredicate
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PhrasePredicate
impl Debug for PhrasePredicate
Source§impl<'de> Deserialize<'de> for PhrasePredicate
impl<'de> Deserialize<'de> for PhrasePredicate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PhrasePredicate
impl RefUnwindSafe for PhrasePredicate
impl Send for PhrasePredicate
impl Sync for PhrasePredicate
impl Unpin for PhrasePredicate
impl UnwindSafe for PhrasePredicate
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