pub struct ProjectBuilder<T: ArtifactOutput = ConfigurableArtifacts> {
pub ignored_error_codes: Vec<u64>,
/* private fields */
}
Fields§
§ignored_error_codes: Vec<u64>
Which error codes to ignore
Implementations§
Source§impl<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
pub fn set_compiler_severity_filter( self, compiler_severity_filter: Severity, ) -> Self
Sourcepub fn set_cached(self, cached: bool) -> Self
pub fn set_cached(self, cached: bool) -> Self
Sets the cache status
Sourcepub fn set_build_info(self, build_info: bool) -> Self
pub fn set_build_info(self, build_info: bool) -> Self
Sets the build info value
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 set_slashed_paths(self, slashed_paths: bool) -> Self
pub fn set_slashed_paths(self, slashed_paths: bool) -> Self
Sets whether to slash all paths on windows
If set to true
all \\
separators are replaced with /
, same as solc
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
pub fn allowed_paths<I, S>(self, args: I) -> Self
Adds multiple allowed-path to the solc executable
Sourcepub fn include_path<P: Into<PathBuf>>(self, path: P) -> Self
pub fn include_path<P: Into<PathBuf>>(self, path: P) -> Self
Adds an --include-path
to the solc executable
Sourcepub fn include_paths<I, S>(self, args: I) -> Self
pub fn include_paths<I, S>(self, args: I) -> Self
Adds multiple include-path to the solc executable
pub fn build(self) -> Result<Project<T>>
Trait Implementations§
Source§impl<T: ArtifactOutput + Default> Default for ProjectBuilder<T>
impl<T: ArtifactOutput + Default> Default for ProjectBuilder<T>
Auto Trait Implementations§
impl<T> Freeze for ProjectBuilder<T>where
T: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more