Enum fuels_code_gen::utils::Source
source · pub enum Source {
String(String),
Local(PathBuf),
}
Expand description
A source of a Truffle artifact JSON.
Variants§
Implementations§
source§impl Source
impl Source
sourcepub fn parse<S>(source: S) -> Result<Self>where
S: AsRef<str>,
pub fn parse<S>(source: S) -> Result<Self>where S: AsRef<str>,
Parses an ABI from a source
Contract ABIs can be retrieved from the local filesystem or it can be provided in-line. It accepts:
-
raw ABI JSON
-
relative/path/to/Contract.json
: a relative path to an ABI JSON file. This relative path is rooted in the current working directory. To specify the root for relative paths, useSource::with_root
. -
`/absolute/path/to/Contract.json to an ABI JSON file.
Trait Implementations§
source§impl PartialEq<Source> for Source
impl PartialEq<Source> for Source
impl Eq for Source
impl StructuralEq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
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