Struct ethers_solc::ProjectBuilder
source · [−]pub struct ProjectBuilder<T: ArtifactOutput = ConfigurableArtifacts> {
pub ignored_error_codes: Vec<u64>,
pub allowed_paths: Vec<PathBuf>,
/* private fields */
}Fields
ignored_error_codes: Vec<u64>Which error codes to ignore
allowed_paths: Vec<PathBuf>All allowed paths
Implementations
sourceimpl<T: ArtifactOutput> ProjectBuilder<T>
impl<T: ArtifactOutput> ProjectBuilder<T>
pub fn paths(self, paths: ProjectPathsConfig) -> Self
pub fn solc(self, solc: impl Into<Solc>) -> Self
pub fn solc_config(self, solc_config: SolcConfig) -> Self
pub fn ignore_error_code(self, code: u64) -> Self
pub fn ignore_error_codes(self, codes: impl IntoIterator<Item = u64>) -> Self
sourcepub fn set_cached(self, cached: bool) -> Self
pub fn set_cached(self, cached: bool) -> Self
Sets the cache status
sourcepub fn offline(self) -> Self
pub fn offline(self) -> Self
Activates offline mode
Prevents network possible access to download/check solc installs
sourcepub fn set_offline(self, offline: bool) -> Self
pub fn set_offline(self, offline: bool) -> Self
Sets the offline status
sourcepub fn no_artifacts(self) -> Self
pub fn no_artifacts(self) -> Self
Disables writing artifacts to disk
sourcepub fn set_no_artifacts(self, artifacts: bool) -> Self
pub fn set_no_artifacts(self, artifacts: bool) -> Self
Sets the no artifacts status
sourcepub fn set_auto_detect(self, auto_detect: bool) -> Self
pub fn set_auto_detect(self, auto_detect: bool) -> Self
Sets automatic solc version detection
sourcepub fn no_auto_detect(self) -> Self
pub fn no_auto_detect(self) -> Self
Disables automatic solc version detection
sourcepub fn solc_jobs(self, jobs: usize) -> Self
pub fn solc_jobs(self, jobs: usize) -> Self
Sets the maximum number of parallel solc processes to run simultaneously.
Panics
jobs must be at least 1
sourcepub fn single_solc_jobs(self) -> Self
pub fn single_solc_jobs(self) -> Self
Sets the number of parallel solc processes to 1, no parallelization
sourcepub fn artifacts<A: ArtifactOutput>(self, artifacts: A) -> ProjectBuilder<A>
pub fn artifacts<A: ArtifactOutput>(self, artifacts: A) -> ProjectBuilder<A>
Set arbitrary ArtifactOutputHandler
sourcepub fn allowed_path<P: Into<PathBuf>>(self, path: P) -> Self
pub fn allowed_path<P: Into<PathBuf>>(self, path: P) -> Self
Adds an allowed-path to the solc executable
sourcepub fn allowed_paths<I, S>(self, args: I) -> Self where
I: IntoIterator<Item = S>,
S: Into<PathBuf>,
pub fn allowed_paths<I, S>(self, args: I) -> Self where
I: IntoIterator<Item = S>,
S: Into<PathBuf>,
Adds multiple allowed-path to the solc executable
pub fn build(self) -> Result<Project<T>>
Trait Implementations
sourceimpl<T: ArtifactOutput + Default> Default for ProjectBuilder<T>
impl<T: ArtifactOutput + Default> Default for ProjectBuilder<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ProjectBuilder<T> where
T: RefUnwindSafe,
impl<T> Send for ProjectBuilder<T> where
T: Send,
impl<T> Sync for ProjectBuilder<T> where
T: Sync,
impl<T> Unpin for ProjectBuilder<T> where
T: Unpin,
impl<T> UnwindSafe for ProjectBuilder<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more