Expand description
§alloy-sol-macro-input
This crate contains inputs to the sol!
macro. It sits in-between
the sol-macro
and syn-solidity
crates, and contains an intermediate
representation of Solidity items. These items are then expanded into
Rust code by the alloy-sol-macro
crate.
This crate is not meant to be used directly, but rather is a tool for writing macros that generate Rust code from Solidity code.
Structs§
- SolAttrs
#[sol(...)]
attributes.- SolInput
- Parsed input for
sol!
-like macro expanders. This struct represents a list of expandable items parsed from either solidity code snippets, or from a JSON abi.
Enums§
- Casing
Style - Defines the casing for the attributes long representation.
- SolInput
Kind - Parsed input for
sol!
-like macro expanders. This enum represents aSol
file, a JSON ABI, or a Solidity type.
Traits§
- Contains
SolAttrs - Trait for items that contain
#[sol(...)]
attributes among other attributes. This is usually a shortcut forSolAttrs::parse
. - SolInput
Expander - Expands a
SolInput
into aTokenStream
.
Functions§
- derives_
mapped - Returns an iterator over all the rust
::
paths in the#[derive(...)]
attributes. - docs_
str - Flattens all the
#[doc = "..."]
attributes into a single string. - mk_doc
- Wraps the argument in a doc attribute.
- parse_
derives - Parses the
#[derive(...)]
attributes into a list of paths. - tokens_
for_ sol json
- Returns
sol!
tokens.