Struct foundry_compilers::SolcConfig
source · pub struct SolcConfig {
pub settings: Settings,
}Expand description
The config to use when compiling the contracts
Fields§
§settings: SettingsHow the file was compiled
Implementations§
source§impl SolcConfig
impl SolcConfig
sourcepub fn builder() -> SolcConfigBuilder
pub fn builder() -> SolcConfigBuilder
Creates a new SolcConfig builder.
§Examples
Autodetect solc version and default settings
use foundry_compilers::SolcConfig;
let config = SolcConfig::builder().build();sourcepub fn can_use_cached(&self, cached: &SolcConfig) -> bool
pub fn can_use_cached(&self, cached: &SolcConfig) -> bool
Returns true if artifacts compiled with given cached config are compatible with this
config and if compilation can be skipped.
Ensures that all settings fields are equal except for output_selection which is required
to be a subset of cached.output_selection.
Trait Implementations§
source§impl Clone for SolcConfig
impl Clone for SolcConfig
source§fn clone(&self) -> SolcConfig
fn clone(&self) -> SolcConfig
Returns a copy 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 SolcConfig
impl Debug for SolcConfig
source§impl<'de> Deserialize<'de> for SolcConfig
impl<'de> Deserialize<'de> for SolcConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<SolcConfig> for Settings
impl From<SolcConfig> for Settings
source§fn from(config: SolcConfig) -> Self
fn from(config: SolcConfig) -> Self
Converts to this type from the input type.
source§impl PartialEq for SolcConfig
impl PartialEq for SolcConfig
source§fn eq(&self, other: &SolcConfig) -> bool
fn eq(&self, other: &SolcConfig) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for SolcConfig
impl Serialize for SolcConfig
impl Eq for SolcConfig
impl StructuralPartialEq for SolcConfig
Auto Trait Implementations§
impl Freeze for SolcConfig
impl RefUnwindSafe for SolcConfig
impl Send for SolcConfig
impl Sync for SolcConfig
impl Unpin for SolcConfig
impl UnwindSafe for SolcConfig
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> 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>
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