Enum fuels_core::source::Source
source · [−]Expand description
A source of a Truffle artifact JSON.
Variants
String(String)
A raw ABI string
Local(PathBuf)
An ABI located on the local file system.
Implementations
sourceimpl Source
impl Source
sourcepub fn parse<S>(source: S) -> Result<Self, Error>where
S: AsRef<str>,
pub fn parse<S>(source: S) -> Result<Self, Error>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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more