Trait foundry_compilers::compilers::ParsedSource
source · pub trait ParsedSource: Debug + Sized + Send {
// Required methods
fn parse(content: &str, file: &Path) -> Self;
fn version_req(&self) -> Option<&VersionReq>;
fn resolve_imports<C>(
&self,
paths: &ProjectPathsConfig<C>
) -> Result<Vec<PathBuf>>;
}
Expand description
Parser of the source files which is used to identify imports and version requirements of the given source. Used by path resolver to resolve imports or determine compiler versions needed to compiler given sources.
Required Methods§
fn parse(content: &str, file: &Path) -> Self
fn version_req(&self) -> Option<&VersionReq>
fn resolve_imports<C>( &self, paths: &ProjectPathsConfig<C> ) -> Result<Vec<PathBuf>>
Object Safety§
This trait is not object safe.