pub struct Item { /* private fields */ }
Expand description
A single item.
Implementations§
Source§impl Item
impl Item
Sourcepub fn lookahead(&self) -> TerminalId
pub fn lookahead(&self) -> TerminalId
Get the lookahead terminal of this item.
Sourcepub fn set_action(&mut self, action: Option<(Symbol, Action)>)
pub fn set_action(&mut self, action: Option<(Symbol, Action)>)
Change the action of this item.
Sourcepub fn pretty<'a>(
&'a self,
grammar: &'a Grammar,
) -> Pretty<&'a Grammar, &'a Self>
pub fn pretty<'a>( &'a self, grammar: &'a Grammar, ) -> Pretty<&'a Grammar, &'a Self>
Get a pretty printer for this item.
Sourcepub fn has_action(&self) -> bool
pub fn has_action(&self) -> bool
Whether this item has an action.
Trait Implementations§
impl Copy for Item
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.