pub struct RoadRulebook<'a> { /* private fields */ }
Expand description
Interface for querying “rules of the road”. This interface provides access to static information about a road network (i.e., information determined prior to the beginning of a simulation). Some rule types may refer to additional dynamic information which will be provided by other interfaces.
Implementations§
Source§impl<'a> RoadRulebook<'a>
impl<'a> RoadRulebook<'a>
Sourcepub fn get_discrete_value_rule(
&self,
rule_id: &String,
) -> Result<DiscreteValueRule, MaliputError>
pub fn get_discrete_value_rule( &self, rule_id: &String, ) -> Result<DiscreteValueRule, MaliputError>
Sourcepub fn get_range_value_rule(
&self,
rule_id: &String,
) -> Result<RangeValueRule, MaliputError>
pub fn get_range_value_rule( &self, rule_id: &String, ) -> Result<RangeValueRule, MaliputError>
Sourcepub fn rules(&self) -> QueryResults
pub fn rules(&self) -> QueryResults
Returns all the rules in the road rulebook.
§Returns
A QueryResults containing all the rules in the road rulebook.
Sourcepub fn find_rules(
&self,
ranges: &Vec<LaneSRange>,
tolerance: f64,
) -> Result<QueryResults, MaliputError>
pub fn find_rules( &self, ranges: &Vec<LaneSRange>, tolerance: f64, ) -> Result<QueryResults, MaliputError>
Finds rules that apply to the given lane s ranges.
§Arguments
ranges
- A vector of super::LaneSRanges to find rules for.tolerance
- A tolerance value to use when finding rules.
§Returns
A QueryResults containing the rules that apply to the given lane s ranges. If no rules are found, an empty QueryResults is returned.
§Errors
Returns a MaliputError if the underlying C++ function fails.
Auto Trait Implementations§
impl<'a> Freeze for RoadRulebook<'a>
impl<'a> RefUnwindSafe for RoadRulebook<'a>
impl<'a> !Send for RoadRulebook<'a>
impl<'a> !Sync for RoadRulebook<'a>
impl<'a> Unpin for RoadRulebook<'a>
impl<'a> UnwindSafe for RoadRulebook<'a>
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