pub trait Parse: Sized {
// Required method
fn parse(
self,
warnings_as_errors: bool,
source_manager: Arc<dyn SourceManager>,
) -> Result<Box<Module>, Report>;
}Expand description
This trait is meant to be implemented by any type that can be parsed to a Module, to allow methods which expect a Module to accept things like:
- A Module which was previously parsed or deserialized
- A string representing the source code of a Module.
- A path to a file containing the source code of a Module.
- A vector of crate::ast::Forms comprising the contents of a Module.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".