pub struct SolcManager { /* private fields */ }Expand description
Represents the solc compiler manager
Implementations§
Source§impl SolcManager
impl SolcManager
Sourcepub fn new() -> Result<Self>
pub fn new() -> Result<Self>
Find or download a compatible solc binary
Search order:
- SOLC_PATH environment variable
- solc on system PATH
- ~/.sentri/solc/solc (cached download)
- Download latest stable from binaries.soliditylang.org
Sourcepub fn get_ast_json(&self, source_path: &Path) -> Result<SolcOutput>
pub fn get_ast_json(&self, source_path: &Path) -> Result<SolcOutput>
Get the full AST JSON output for a Solidity file
Sourcepub fn get_ast_for_source(
&self,
source: &str,
_filename: &str,
) -> Result<SolcOutput>
pub fn get_ast_for_source( &self, source: &str, _filename: &str, ) -> Result<SolcOutput>
Get AST for source code string (writes to temp file)
Trait Implementations§
Source§impl Clone for SolcManager
impl Clone for SolcManager
Source§fn clone(&self) -> SolcManager
fn clone(&self) -> SolcManager
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SolcManager
impl RefUnwindSafe for SolcManager
impl Send for SolcManager
impl Sync for SolcManager
impl Unpin for SolcManager
impl UnsafeUnpin for SolcManager
impl UnwindSafe for SolcManager
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