Struct ethers_solc::project::ProjectCompiler
source · pub struct ProjectCompiler<'a, T: ArtifactOutput> { /* private fields */ }Implementations
sourceimpl<'a, T: ArtifactOutput> ProjectCompiler<'a, T>
impl<'a, T: ArtifactOutput> ProjectCompiler<'a, T>
sourcepub fn with_sources_and_solc(
project: &'a Project<T>,
sources: Sources,
solc: Solc
) -> Result<Self>
pub fn with_sources_and_solc(
project: &'a Project<T>,
sources: Sources,
solc: Solc
) -> Result<Self>
Compiles the sources with a pinned Solc instance
sourcepub fn with_sparse_output(
self,
sparse_output: impl Into<SparseOutputFilter>
) -> Self
pub fn with_sparse_output(
self,
sparse_output: impl Into<SparseOutputFilter>
) -> Self
Applies the specified filter to be applied when selecting solc output for specific files to be compiled
sourcepub fn compile(self) -> Result<ProjectCompileOutput<T>>
pub fn compile(self) -> Result<ProjectCompileOutput<T>>
Compiles all the sources of the Project in the appropriate mode
If caching is enabled, the sources are filtered and only dirty sources are recompiled.
The output of the compile process can be a mix of reused artifacts and freshly compiled
Contracts
Example
use ethers_solc::Project;
let project = Project::builder().build().unwrap();
let output = project.compile().unwrap();Trait Implementations
sourceimpl<'a, T: Debug + ArtifactOutput> Debug for ProjectCompiler<'a, T>
impl<'a, T: Debug + ArtifactOutput> Debug for ProjectCompiler<'a, T>
Auto Trait Implementations
impl<'a, T> !RefUnwindSafe for ProjectCompiler<'a, T>
impl<'a, T> !Send for ProjectCompiler<'a, T>
impl<'a, T> !Sync for ProjectCompiler<'a, T>
impl<'a, T> Unpin for ProjectCompiler<'a, T>
impl<'a, T> !UnwindSafe for ProjectCompiler<'a, T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more