pub trait RuleDefinition:
Clone
+ Debug
+ Display
+ PartialEq
+ Hash
+ Eq {
type Action: ActionDefinition;
type Guard: VariableConstraint;
// Required methods
fn id(&self) -> u32;
fn source(&self) -> &Location;
fn target(&self) -> &Location;
fn guard(&self) -> &Self::Guard;
fn actions(&self) -> impl Iterator<Item = &Self::Action>;
// Provided methods
fn has_decrements(&self) -> bool { ... }
fn has_resets(&self) -> bool { ... }
}Expand description
Trait implemented by all flavors of rules
Trait for common functionality of rules. This trait is implemented for
the general_threshold_automaton::Rule type for
general_threshold_automaton::GeneralThresholdAutomaton and
lia_threshold_automaton::LIARule for
lia_threshold_automaton::LIAThresholdAutomaton.
Required Associated Types§
Sourcetype Action: ActionDefinition
type Action: ActionDefinition
Type of the actions of the rule
Sourcetype Guard: VariableConstraint
type Guard: VariableConstraint
Type of the guard of the rule
Required Methods§
Sourcefn id(&self) -> u32
fn id(&self) -> u32
Returns the id of the rule
The id is a unique identifier assigned to the rule in the specification. It is used to refer to the rule in the specification.
Sourcefn source(&self) -> &Location
fn source(&self) -> &Location
Returns the source location of the rule
The source location is the location from which the rule transitions to the target location.
Sourcefn target(&self) -> &Location
fn target(&self) -> &Location
Returns the target location of the rule
The target location is the location to which the rule transitions from the source location.
Provided Methods§
Sourcefn has_decrements(&self) -> bool
fn has_decrements(&self) -> bool
Check whether the rule has a decrement action
Sourcefn has_resets(&self) -> bool
fn has_resets(&self) -> bool
Check whether the rule has a reset action
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.