Struct ethers_solc::info::ContractInfo
source · Expand description
Represents the common contract argument pattern for <path>:<contractname>
where <path>:
is
optional.
Fields§
§path: Option<String>
Location of the contract
name: String
Name of the contract
Implementations§
source§impl ContractInfo
impl ContractInfo
sourcepub fn new(info: impl AsRef<str>) -> Self
pub fn new(info: impl AsRef<str>) -> Self
Creates a new ContractInfo
from the info
str.
This will attempt ContractInfo::from_str
, if info
matches the <path>:<name>
format,
the ContractInfo
’s path
will be set.
otherwise the name
of the new object will be info
.
Example
use ethers_solc::info::ContractInfo;
let info = ContractInfo::new("src/Greeter.sol:Greeter");
assert_eq!(info, ContractInfo {path: Some("src/Greeter.sol".to_string()), name: "Greeter".to_string()});
Trait Implementations§
source§impl Clone for ContractInfo
impl Clone for ContractInfo
source§fn clone(&self) -> ContractInfo
fn clone(&self) -> ContractInfo
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 ContractInfo
impl Debug for ContractInfo
source§impl Display for ContractInfo
impl Display for ContractInfo
source§impl<'a> From<&'a ContractInfo> for ContractInfoRef<'a>
impl<'a> From<&'a ContractInfo> for ContractInfoRef<'a>
source§fn from(info: &'a ContractInfo) -> Self
fn from(info: &'a ContractInfo) -> Self
Converts to this type from the input type.
source§impl<'a> From<ContractInfo> for ContractInfoRef<'a>
impl<'a> From<ContractInfo> for ContractInfoRef<'a>
source§fn from(info: ContractInfo) -> Self
fn from(info: ContractInfo) -> Self
Converts to this type from the input type.
source§impl From<FullContractInfo> for ContractInfo
impl From<FullContractInfo> for ContractInfo
source§fn from(info: FullContractInfo) -> Self
fn from(info: FullContractInfo) -> Self
Converts to this type from the input type.
source§impl FromStr for ContractInfo
impl FromStr for ContractInfo
source§impl Hash for ContractInfo
impl Hash for ContractInfo
source§impl PartialEq<ContractInfo> for ContractInfo
impl PartialEq<ContractInfo> for ContractInfo
source§fn eq(&self, other: &ContractInfo) -> bool
fn eq(&self, other: &ContractInfo) -> bool
source§impl TryFrom<ContractInfo> for FullContractInfo
impl TryFrom<ContractInfo> for FullContractInfo
§type Error = ParseContractInfoError
type Error = ParseContractInfoError
The type returned in the event of a conversion error.
impl Eq for ContractInfo
impl StructuralEq for ContractInfo
impl StructuralPartialEq for ContractInfo
Auto Trait Implementations§
impl RefUnwindSafe for ContractInfo
impl Send for ContractInfo
impl Sync for ContractInfo
impl Unpin for ContractInfo
impl UnwindSafe for ContractInfo
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.