pub struct Error {
pub component: String,
pub error_code: Option<String>,
pub formatted_message: String,
pub message: String,
pub severity: String,
pub source_location: Option<SourceLocation>,
pub type: String,
}Expand description
The solc --standard-json output error.
Fields§
§component: StringThe component type.
error_code: Option<String>The error code.
formatted_message: StringThe formatted error message.
message: StringThe non-formatted error message.
severity: StringThe error severity.
source_location: Option<SourceLocation>The error location data.
type: StringThe error type.
Implementations§
Source§impl Error
impl Error
Sourcepub const IGNORED_WARNING_CODES: [&'static str; 5]
pub const IGNORED_WARNING_CODES: [&'static str; 5]
The list of ignored solc warnings that are strictly EVM-related.
Sourcepub fn new<S>(
type: &str,
message: S,
source_location: Option<SourceLocation>,
sources: Option<&BTreeMap<String, SolcStandardJsonInputSource>>,
) -> Selfwhere
S: Display,
pub fn new<S>(
type: &str,
message: S,
source_location: Option<SourceLocation>,
sources: Option<&BTreeMap<String, SolcStandardJsonInputSource>>,
) -> Selfwhere
S: Display,
A shortcut constructor.
Sourcepub fn new_error<S>(
message: S,
source_location: Option<SourceLocation>,
sources: Option<&BTreeMap<String, SolcStandardJsonInputSource>>,
) -> Selfwhere
S: Display,
pub fn new_error<S>(
message: S,
source_location: Option<SourceLocation>,
sources: Option<&BTreeMap<String, SolcStandardJsonInputSource>>,
) -> Selfwhere
S: Display,
A shortcut constructor.
Sourcepub fn new_warning<S>(
message: S,
source_location: Option<SourceLocation>,
sources: Option<&BTreeMap<String, SolcStandardJsonInputSource>>,
) -> Selfwhere
S: Display,
pub fn new_warning<S>(
message: S,
source_location: Option<SourceLocation>,
sources: Option<&BTreeMap<String, SolcStandardJsonInputSource>>,
) -> Selfwhere
S: Display,
A shortcut constructor.
Sourcepub fn warning_send_and_transfer(
node: Option<&str>,
id_paths: &BTreeMap<usize, &String>,
sources: &BTreeMap<String, SolcStandardJsonInputSource>,
) -> Self
pub fn warning_send_and_transfer( node: Option<&str>, id_paths: &BTreeMap<usize, &String>, sources: &BTreeMap<String, SolcStandardJsonInputSource>, ) -> Self
Returns the <address payable>’s send and transfer methods usage error.
Sourcepub fn warning_tx_origin(
node: Option<&str>,
id_paths: &BTreeMap<usize, &String>,
sources: &BTreeMap<String, SolcStandardJsonInputSource>,
) -> Self
pub fn warning_tx_origin( node: Option<&str>, id_paths: &BTreeMap<usize, &String>, sources: &BTreeMap<String, SolcStandardJsonInputSource>, ) -> Self
Returns the origin instruction usage warning.
Sourcepub fn error_runtime_code(
node: Option<&str>,
id_paths: &BTreeMap<usize, &String>,
sources: &BTreeMap<String, SolcStandardJsonInputSource>,
) -> Self
pub fn error_runtime_code( node: Option<&str>, id_paths: &BTreeMap<usize, &String>, sources: &BTreeMap<String, SolcStandardJsonInputSource>, ) -> Self
Returns the runtimeCode code usage error.
Sourcepub fn push_contract_path(&mut self, path: &str)
pub fn push_contract_path(&mut self, path: &str)
Appends the contract path to the message..
Sourcepub fn is_warning(&self) -> bool
pub fn is_warning(&self) -> bool
Returns true if this is a warning.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
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
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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