pub enum Status {
Unparsed,
Expanded,
Done,
Failed,
}Expand description
Lifecycle state of a node in a ParseTree.
Variants§
Unparsed
The node is waiting to be processed by the pass scheduled for its round.
Expanded
The pass expanded the node; its children carry the remaining work.
Done
The pass accepted the node as fully parsed; it has no children.
Failed
The pass that processed the node could not parse it.
A failed node is retried once per remaining pass in the schedule; once every pass has had a turn the failure is permanent. Kept in the tree so consumers (e.g. an LSP) still see the coarse structure around errors.
Implementations§
Source§impl Status
impl Status
Sourcepub fn is_unparsed(self) -> bool
pub fn is_unparsed(self) -> bool
Returns true if the status is Status::Unparsed.
Sourcepub fn is_failed(self) -> bool
pub fn is_failed(self) -> bool
Returns true if the status is Status::Failed.
Trait Implementations§
impl Copy for Status
impl Eq for Status
Source§impl Ord for Status
impl Ord for Status
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Status
impl PartialOrd for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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