Struct ethers_solc::project_util::mock::MockFile
source · pub struct MockFile {
pub id: usize,
pub name: String,
pub imports: BTreeSet<MockImport>,
pub lib_id: Option<usize>,
pub emit_artifacts: bool,
}
Available on crate feature
project-util
only.Expand description
Skeleton of a mock source file
Fields§
§id: usize
internal id of this file
name: String
The source name of this file
imports: BTreeSet<MockImport>
all the imported files
lib_id: Option<usize>
lib id if this file is part of a lib
emit_artifacts: bool
whether this file should emit artifacts
Implementations§
source§impl MockFile
impl MockFile
sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
Returns true
if this file is part of an external lib
pub fn target_path( &self, gen: &MockProjectGenerator, paths: &ProjectPathsConfig ) -> PathBuf
Trait Implementations§
source§impl<'de> Deserialize<'de> for MockFile
impl<'de> Deserialize<'de> for MockFile
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 RefUnwindSafe for MockFile
impl Send for MockFile
impl Sync for MockFile
impl Unpin for MockFile
impl UnwindSafe for MockFile
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