pub struct Spec { /* private fields */ }Expand description
A specification: a root module together with every module it reaches.
Implementations§
Source§impl Spec
impl Spec
Sourcepub fn parse(src: &str) -> Result<Self>
pub fn parse(src: &str) -> Result<Self>
Parse a self-contained specification. EXTENDS of a standard module is
honoured; anything else it names is reported as missing.
Sourcepub fn from_file(path: impl AsRef<Path>) -> Result<Self>
pub fn from_file(path: impl AsRef<Path>) -> Result<Self>
Read a specification from a .tla file, resolving whatever it extends
or instantiates from the directory the file is in — which is where TLA+
tools look, and what makes a path enough to work from.
pub fn load(src: &str, modules: &impl Modules) -> Result<Self>
pub fn name(&self) -> &str
Sourcepub fn variables(&self) -> impl Iterator<Item = &str>
pub fn variables(&self) -> impl Iterator<Item = &str>
The variables of the root module, including any it inherits.
pub fn constants(&self) -> impl Iterator<Item = &str>
pub fn defines(&self, name: &str) -> bool
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 UnsafeUnpin 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