Skip to main content

Op

Enum Op 

Source
pub enum Op {
Show 42 variants Implies, Equiv, Or, And, Eq, Neq, Lt, Gt, Le, Ge, In, NotIn, Subseteq, Supseteq, AtAt, OneTo, Cup, Cap, SetMinus, DotDot, Plus, Minus, Times, Div, Mod, Cartesian, Concat, Pow, Not, Always, Eventually, Forall, Exists, Domain, Subset, BigUnion, Enabled, Unchanged, LeadsTo, TemporalForall, TemporalExists, User(&'static str),
}

Variants§

§

Implies

§

Equiv

§

Or

§

And

§

Eq

§

Neq

§

Lt

§

Gt

§

Le

§

Ge

§

In

§

NotIn

§

Subseteq

§

Supseteq

§

AtAt

§

OneTo

§

Cup

§

Cap

§

SetMinus

§

DotDot

§

Plus

§

Minus

§

Times

§

Div

§

Mod

§

Cartesian

§

Concat

§

Pow

§

Not

§

Always

§

Eventually

§

Forall

§

Exists

§

Domain

§

Subset

§

BigUnion

§

Enabled

§

Unchanged

§

LeadsTo

P ~> Q: temporal leads-to.

§

TemporalForall

\AA x : F and \EE x : F: quantification over a hidden variable.

§

TemporalExists

§

User(&'static str)

An operator the language reserves a symbol and a precedence for but gives no meaning to. Every one of these exists to be defined by a specification; \prec, \oplus and & are all of them.

Implementations§

Source§

impl Op

Source

pub fn infix_prec(self) -> Option<u8>

Binding power as an infix operator; None for prefix-only operators.

Ordering follows TLA+’s table where it matters for these specs: \cup binds tighter than =, and :> tighter than @@, so a \cup {b} = c and ("k" :> v) @@ rest parse without parentheses.

Source

pub fn is_postfix(self) -> bool

s^+, s^* and s^# follow their operand rather than sitting between two, so they are never infix.

Source

pub fn is_right_assoc(self) -> bool

Source

pub fn symbol(self) -> &'static str

How the operator is written. Where TLA+ offers several spellings the ASCII one is chosen, so printed output can be re-read by the parser.

Source

pub fn prefix_prec(self) -> u8

How tightly the operator holds its operand when used as a prefix, and so how tightly it binds as a node in printed output.

Source

pub fn is_word(self) -> bool

True for the word-shaped prefix operators, which need a space before their operand where the symbolic ones do not.

Trait Implementations§

Source§

impl Clone for Op

Source§

fn clone(&self) -> Op

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Op

Source§

impl Debug for Op

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Op

Source§

impl PartialEq for Op

Source§

fn eq(&self, other: &Op) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Op

Auto Trait Implementations§

§

impl Freeze for Op

§

impl RefUnwindSafe for Op

§

impl Send for Op

§

impl Sync for Op

§

impl Unpin for Op

§

impl UnsafeUnpin for Op

§

impl UnwindSafe for Op

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.