pub struct RuleSet {
pub rules: Vec<Rule>,
pub rule_by_id: Vec<usize>,
/* private fields */
}Expand description
Composer\DependencyResolver\RuleSet. rules is the storage of all
rules (including those rejected by add as duplicates, which the solver
keeps using); rule_by_id is ruleById.
Fields§
§rules: Vec<Rule>§rule_by_id: Vec<usize>ruleById: registered rules, in insertion order.
Implementations§
Source§impl RuleSet
impl RuleSet
pub fn new() -> RuleSet
Sourcepub fn add(&mut self, rule: Rule, rule_type: RuleType) -> (usize, bool)
pub fn add(&mut self, rule: Rule, rule_type: RuleType) -> (usize, bool)
add: the rule is stored; it is registered (type set, ruleById)
only if no identical rule exists. Returns (storage index,
registered?).
pub fn is_empty(&self) -> bool
Sourcepub fn ids_of_type(&self, rule_type: RuleType) -> &[usize]
pub fn ids_of_type(&self, rule_type: RuleType) -> &[usize]
getIteratorFor($type): ids of one type, in order.
Sourcepub fn ids_in_iterator_order(&self) -> Vec<usize>
pub fn ids_in_iterator_order(&self) -> Vec<usize>
getIterator(): PACKAGE then REQUEST then LEARNED (sorted types).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuleSet
impl RefUnwindSafe for RuleSet
impl Send for RuleSet
impl Sync for RuleSet
impl Unpin for RuleSet
impl UnsafeUnpin for RuleSet
impl UnwindSafe for RuleSet
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