pub struct CompilerConfigBuilder {
config: CompilerConfig,
}Expand description
Builder for CompilerConfig with fluent API
Fields§
§config: CompilerConfigImplementations§
Source§impl CompilerConfigBuilder
impl CompilerConfigBuilder
pub fn input_file(self, path: impl Into<PathBuf>) -> Self
pub fn output_file(self, path: impl Into<PathBuf>) -> Self
pub fn optimization_level(self, level: u8) -> Self
pub fn output_format(self, format: OutputFormat) -> Self
pub fn target_version(self, version: impl Into<String>) -> Self
pub fn debug_info(self, enabled: bool) -> Self
pub fn verbose(self, enabled: bool) -> Self
pub fn gas_model(self, model: GasModel) -> Self
pub fn warnings_as_errors(self, enabled: bool) -> Self
pub fn max_contract_size(self, size: usize) -> Self
pub fn include_abi(self, enabled: bool) -> Self
pub fn include_source_map(self, enabled: bool) -> Self
pub fn validate_only(self, enabled: bool) -> Self
pub fn analyze_only(self, enabled: bool) -> Self
Sourcepub fn build(self) -> Result<CompilerConfig, ConfigError>
pub fn build(self) -> Result<CompilerConfig, ConfigError>
Build and validate the configuration
Sourcepub fn build_unchecked(self) -> CompilerConfig
pub fn build_unchecked(self) -> CompilerConfig
Build without validation (for testing)
Trait Implementations§
Source§impl Clone for CompilerConfigBuilder
impl Clone for CompilerConfigBuilder
Source§fn clone(&self) -> CompilerConfigBuilder
fn clone(&self) -> CompilerConfigBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CompilerConfigBuilder
impl Debug for CompilerConfigBuilder
Source§impl Default for CompilerConfigBuilder
impl Default for CompilerConfigBuilder
Source§fn default() -> CompilerConfigBuilder
fn default() -> CompilerConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompilerConfigBuilder
impl RefUnwindSafe for CompilerConfigBuilder
impl Send for CompilerConfigBuilder
impl Sync for CompilerConfigBuilder
impl Unpin for CompilerConfigBuilder
impl UnwindSafe for CompilerConfigBuilder
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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