Trait foundry_compilers::compilers::CompilerInput
source · pub trait CompilerInput: Serialize + Send + Sync + Sized {
type Settings: CompilerSettings;
// Required methods
fn build(
sources: Sources,
settings: Self::Settings,
version: &Version
) -> Vec<Self>;
fn sources(&self) -> &Sources;
fn compiler_name(&self) -> String;
fn strip_prefix(&mut self, base: &Path);
// Provided method
fn with_remappings(self, _remappings: Vec<Remapping>) -> Self { ... }
}
Expand description
Input of a compiler, including sources and settings used for their compilation.
Required Associated Types§
Required Methods§
sourcefn build(
sources: Sources,
settings: Self::Settings,
version: &Version
) -> Vec<Self>
fn build( sources: Sources, settings: Self::Settings, version: &Version ) -> Vec<Self>
Constructs one or multiple inputs from given sources set. Might return multiple inputs in cases when sources need to be divided into sets per language (Yul + Solidity for example).
sourcefn compiler_name(&self) -> String
fn compiler_name(&self) -> String
Returns compiler name used by reporters to display output during compilation.
sourcefn strip_prefix(&mut self, base: &Path)
fn strip_prefix(&mut self, base: &Path)
Strips given prefix from all paths.
Provided Methods§
sourcefn with_remappings(self, _remappings: Vec<Remapping>) -> Self
fn with_remappings(self, _remappings: Vec<Remapping>) -> Self
Method which might be invoked to add remappings to the input.
Object Safety§
This trait is not object safe.