pub struct CSRule {
id: u32,
source: ACSLocation,
target: ACSLocation,
guard: CSIntervalConstraint,
actions: Vec<CSIntervalAction>,
}Expand description
Rule of a ACSThresholdAutomaton that can be directly applied to a the
cs types
Fields§
§id: u32Unique ID
source: ACSLocationSource location of the rule
target: ACSLocationtarget location of the rule
guard: CSIntervalConstraintGuard of the rule
actions: Vec<CSIntervalAction>Actions of the rule
Implementations§
Source§impl CSRule
impl CSRule
Sourcefn from_interval_rule(ctx: &IndexCtx, r: &IntervalTARule) -> Self
fn from_interval_rule(ctx: &IndexCtx, r: &IntervalTARule) -> Self
Translate from an [IntervalTARule] to a CSRule
Sourcepub fn is_enabled(&self, cfg: &ACSTAConfig) -> bool
pub fn is_enabled(&self, cfg: &ACSTAConfig) -> bool
Check whether the rule is enabled in the current configuration
Sourcepub fn target(&self) -> &ACSLocation
pub fn target(&self) -> &ACSLocation
Get the target of the rule
Sourcepub fn source(&self) -> &ACSLocation
pub fn source(&self) -> &ACSLocation
Get the source location of the rule
Sourcepub fn actions(&self) -> impl Iterator<Item = &CSIntervalAction>
pub fn actions(&self) -> impl Iterator<Item = &CSIntervalAction>
Get the actions of the rule
Sourcepub fn guard(&self) -> &CSIntervalConstraint
pub fn guard(&self) -> &CSIntervalConstraint
Get the guard of the rule
Trait Implementations§
impl Eq for CSRule
impl StructuralPartialEq for CSRule
Auto Trait Implementations§
impl Freeze for CSRule
impl RefUnwindSafe for CSRule
impl Send for CSRule
impl Sync for CSRule
impl Unpin for CSRule
impl UnwindSafe for CSRule
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more