pub struct AbiParser {}
Implementations§
Source§impl AbiParser
impl AbiParser
Sourcepub fn tokens_from_abi_string(
abi: &str,
type_aliases: &HashMap<String, String>,
) -> CainomeResult<TokenizedAbi>
pub fn tokens_from_abi_string( abi: &str, type_aliases: &HashMap<String, String>, ) -> CainomeResult<TokenizedAbi>
Generates the Token
s from the given ABI string.
The abi
can have two formats:
- Entire
SierraClass
json representation. - The
abi
key from theSierraClass
, which is an array ofAbiEntry
.
§Arguments
abi
- A string representing the ABI.type_aliases
- Types to be renamed to avoid name clashing of generated types.
Sourcepub fn parse_abi_string(abi: &str) -> CainomeResult<Vec<AbiEntry>>
pub fn parse_abi_string(abi: &str) -> CainomeResult<Vec<AbiEntry>>
Parses an ABI string to output a Vec<AbiEntry>
.
The abi
can have two formats:
- Entire
SierraClass
json representation. - The
abi
key from theSierraClass
, which is an array of AbiEntry.
§Arguments
abi
- A string representing the ABI.
Sourcepub fn collect_tokens(
entries: &[AbiEntry],
type_aliases: &HashMap<String, String>,
) -> CainomeResult<TokenizedAbi>
pub fn collect_tokens( entries: &[AbiEntry], type_aliases: &HashMap<String, String>, ) -> CainomeResult<TokenizedAbi>
Parse all tokens in the ABI.
Auto Trait Implementations§
impl Freeze for AbiParser
impl RefUnwindSafe for AbiParser
impl Send for AbiParser
impl Sync for AbiParser
impl Unpin for AbiParser
impl UnwindSafe for AbiParser
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