Struct ethers_solc::artifacts::SourceFiles
source · pub struct SourceFiles(pub BTreeMap<String, SourceFile>);
Expand description
A wrapper type for a list of source files
path -> SourceFile
Tuple Fields§
§0: BTreeMap<String, SourceFile>
Implementations§
source§impl SourceFiles
impl SourceFiles
sourcepub fn into_ids(self) -> impl Iterator<Item = (u32, String)>
pub fn into_ids(self) -> impl Iterator<Item = (u32, String)>
Returns an iterator over the source files’ ids and path
use std::collections::BTreeMap;
use ethers_solc::artifacts::SourceFiles;
let sources: BTreeMap<u32,String> = files.into_ids().collect();
sourcepub fn into_paths(self) -> impl Iterator<Item = (String, u32)>
pub fn into_paths(self) -> impl Iterator<Item = (String, u32)>
Returns an iterator over the source files’ paths and ids
use std::collections::BTreeMap;
use ethers_solc::artifacts::SourceFiles;
let sources :BTreeMap<String, u32> = files.into_paths().collect();
Trait Implementations§
source§impl Clone for SourceFiles
impl Clone for SourceFiles
source§fn clone(&self) -> SourceFiles
fn clone(&self) -> SourceFiles
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 SourceFiles
impl Debug for SourceFiles
source§impl<'de> Deserialize<'de> for SourceFiles
impl<'de> Deserialize<'de> for SourceFiles
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 PartialEq<SourceFiles> for SourceFiles
impl PartialEq<SourceFiles> for SourceFiles
source§fn eq(&self, other: &SourceFiles) -> bool
fn eq(&self, other: &SourceFiles) -> bool
source§impl Serialize for SourceFiles
impl Serialize for SourceFiles
impl Eq for SourceFiles
impl StructuralEq for SourceFiles
impl StructuralPartialEq for SourceFiles
Auto Trait Implementations§
impl RefUnwindSafe for SourceFiles
impl Send for SourceFiles
impl Sync for SourceFiles
impl Unpin for SourceFiles
impl UnwindSafe for SourceFiles
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.