pub struct RangeValueRule { /* private fields */ }
Expand description
§Rule
A Rule may have multiple states that affect agent behavior while it is driving through the rule’s zone. The possible states of a Rule must be semantically coherent. The current state of a Rule is given by a [RuleStateProvider]. States can be:
- range based (RangeValueRule).
- discrete (DiscreteValueRule).
§RangeValueRule
Ranges describe a numeric range based rule. Ranges are closed and continuous, defined by a minimum and maximum quantity. When only one extreme is formally defined, the other should take a semantically correct value. For example, if a speed limit only specifies a maximum value, the minimum value is typically zero.
Implementations§
Source§impl RangeValueRule
impl RangeValueRule
Sourcepub fn type_id(&self) -> String
pub fn type_id(&self) -> String
Returns the type of the rule as a string. Example: “right-of-way-rule-type-id”, “direction-usage-rule-type-id”
§Returns
The type id of the rule.
Sourcepub fn zone(&self) -> LaneSRoute
pub fn zone(&self) -> LaneSRoute
Returns a crate::api::LaneSRoute that represents the zone that the rule applies to.
§Returns
A crate::api::LaneSRoute representing the zone of the rule.