Skip to main content

ParseFromStrWithErrors

Trait ParseFromStrWithErrors 

Source
pub trait ParseFromStrWithErrors: Sized {
    // Required method
    fn parse_from_str_with_errors(
        file_id: usize,
        content: &str,
        unstable_features: &UnstableFeatures,
        diagnostics: &mut DiagnosticManager,
    ) -> Option<Self>;
}
Expand description

Trait for parsing with collection of errors.

Required Methods§

Source

fn parse_from_str_with_errors( file_id: usize, content: &str, unstable_features: &UnstableFeatures, diagnostics: &mut DiagnosticManager, ) -> Option<Self>

Parse a value from the string content with Errors.

Feature-gated syntax in the parsed AST is checked against unstable_features; uses of disabled features are pushed to diagnostics.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<A: AstNode> ParseFromStrWithErrors for A