pub struct ShiftedRuleRef {
pub rule: usize,
pub shifted: usize,
}Expand description
A struct for single shifted named production rule.
name -> Token1 Token2 . Token3
^^^^^^^^^^^^^ shifted = 2This struct has index of the Rule in Grammar::rules and it will be used for Eq, Ord, Hash
Fields§
§rule: usizeindex of the rule in rules
shifted: usizeshifted index
Trait Implementations§
Source§impl Clone for ShiftedRuleRef
impl Clone for ShiftedRuleRef
Source§fn clone(&self) -> ShiftedRuleRef
fn clone(&self) -> ShiftedRuleRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShiftedRuleRef
impl Debug for ShiftedRuleRef
Source§impl Default for ShiftedRuleRef
impl Default for ShiftedRuleRef
Source§fn default() -> ShiftedRuleRef
fn default() -> ShiftedRuleRef
Returns the “default value” for a type. Read more
Source§impl Ord for ShiftedRuleRef
impl Ord for ShiftedRuleRef
Source§fn cmp(&self, other: &ShiftedRuleRef) -> Ordering
fn cmp(&self, other: &ShiftedRuleRef) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ShiftedRuleRef
impl PartialEq for ShiftedRuleRef
Source§impl PartialOrd for ShiftedRuleRef
impl PartialOrd for ShiftedRuleRef
impl Copy for ShiftedRuleRef
impl Eq for ShiftedRuleRef
impl StructuralPartialEq for ShiftedRuleRef
Auto Trait Implementations§
impl Freeze for ShiftedRuleRef
impl RefUnwindSafe for ShiftedRuleRef
impl Send for ShiftedRuleRef
impl Sync for ShiftedRuleRef
impl Unpin for ShiftedRuleRef
impl UnwindSafe for ShiftedRuleRef
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