pub struct ParseOutcome<T> {
pub value: Option<T>,
pub diagnostics: Vec<Diagnostic>,
}Expand description
The result of a recovering parse.
Fields§
§value: Option<T>The recovered value, when the selected entry point can construct one.
parse_recovering currently always returns a ParsedProgram: valid
input produces the parsed tree, while invalid input preserves recoverable
clauses or falls back to a whole-input error statement.
diagnostics: Vec<Diagnostic>Lexer and parser diagnostics in deterministic source order.
Trait Implementations§
Source§impl<T: Clone> Clone for ParseOutcome<T>
impl<T: Clone> Clone for ParseOutcome<T>
Source§impl<T: Debug> Debug for ParseOutcome<T>
impl<T: Debug> Debug for ParseOutcome<T>
Source§impl<'de, T> Deserialize<'de> for ParseOutcome<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for ParseOutcome<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq> Eq for ParseOutcome<T>
Source§impl<T: PartialEq> PartialEq for ParseOutcome<T>
impl<T: PartialEq> PartialEq for ParseOutcome<T>
Source§impl<T> Serialize for ParseOutcome<T>where
T: Serialize,
impl<T> Serialize for ParseOutcome<T>where
T: Serialize,
impl<T: PartialEq> StructuralPartialEq for ParseOutcome<T>
Auto Trait Implementations§
impl<T> Freeze for ParseOutcome<T>
impl<T> RefUnwindSafe for ParseOutcome<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for ParseOutcome<T>
impl<T> Sync for ParseOutcome<T>
impl<T> Unpin for ParseOutcome<T>
impl<T> UnsafeUnpin for ParseOutcome<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for ParseOutcome<T>where
Option<T>: UnwindSafe,
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