pub struct ProcessingMode {
pub rules: Vec<ConstructionRule>,
}Expand description
Processing mode containing construction rules
Corresponds to OpenJade’s ProcessingMode class.
Stores all element construction rules defined in the template.
Fields§
§rules: Vec<ConstructionRule>Construction rules indexed by element name In OpenJade, rules are stored in intrusive linked lists and indexed lazily. We use a simple Vec for now - can optimize later with HashMap if needed.
Implementations§
Source§impl ProcessingMode
impl ProcessingMode
Sourcepub fn find_match(&self, gi: &str) -> Option<&ConstructionRule>
pub fn find_match(&self, gi: &str) -> Option<&ConstructionRule>
Find matching rule for an element
Corresponds to OpenJade’s ProcessingMode::findMatch().
Returns the first rule matching the given element name.
Auto Trait Implementations§
impl Freeze for ProcessingMode
impl !RefUnwindSafe for ProcessingMode
impl !Send for ProcessingMode
impl !Sync for ProcessingMode
impl Unpin for ProcessingMode
impl !UnwindSafe for ProcessingMode
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