pub struct CompilerConfig {Show 14 fields
pub input_file: PathBuf,
pub output_file: Option<PathBuf>,
pub optimization_level: u8,
pub output_format: OutputFormat,
pub target_version: String,
pub include_debug_info: bool,
pub include_abi: bool,
pub include_source_map: bool,
pub gas_model: GasModel,
pub validate_only: bool,
pub analyze_only: bool,
pub verbose: bool,
pub warnings_as_errors: bool,
pub max_contract_size: usize,
}Fields§
§input_file: PathBuf§output_file: Option<PathBuf>§optimization_level: u8§output_format: OutputFormat§target_version: String§include_debug_info: bool§include_abi: bool§include_source_map: bool§gas_model: GasModel§validate_only: bool§analyze_only: bool§verbose: bool§warnings_as_errors: bool§max_contract_size: usizeImplementations§
Source§impl CompilerConfig
impl CompilerConfig
Sourcepub fn builder() -> CompilerConfigBuilder
pub fn builder() -> CompilerConfigBuilder
Create a new builder for CompilerConfig
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validate the configuration
Sourcepub fn is_debug_enabled(&self) -> bool
pub fn is_debug_enabled(&self) -> bool
Check if debug output is enabled
Sourcepub fn is_optimized(&self) -> bool
pub fn is_optimized(&self) -> bool
Check if optimization is enabled
Sourcepub fn optimization_passes(&self) -> u32
pub fn optimization_passes(&self) -> u32
Get optimization passes based on level
Trait Implementations§
Source§impl Clone for CompilerConfig
impl Clone for CompilerConfig
Source§fn clone(&self) -> CompilerConfig
fn clone(&self) -> CompilerConfig
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 CompilerConfig
impl Debug for CompilerConfig
Auto Trait Implementations§
impl Freeze for CompilerConfig
impl RefUnwindSafe for CompilerConfig
impl Send for CompilerConfig
impl Sync for CompilerConfig
impl Unpin for CompilerConfig
impl UnwindSafe for CompilerConfig
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