Trait 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>) -> 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§

Source

fn parse(content: &str, file: &Path) -> Self

Source

fn version_req(&self) -> Option<&VersionReq>

Source

fn resolve_imports<C>(&self, paths: &ProjectPathsConfig<C>) -> Vec<PathBuf>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§