pub trait TopicList: SolType + Sealed {
const COUNT: usize;
// Required method
fn detokenize<I, D>(topics: I) -> Result<Self::RustType>
where I: IntoIterator<Item = D>,
D: Into<WordToken>;
}
Expand description
A list of Solidity event topics.
This trait is implemented only on tuples of arity up to 4. The tuples must
contain only SolType
s where the token is a WordToken
, and as such
it is sealed to prevent prevent incorrect downstream implementations.
See the Solidity event ABI specification for more details on how events’ topics are encoded.
§Implementer’s Guide
It should not be necessary to implement this trait manually. Instead, use
the sol!
procedural macro to parse Solidity syntax into
types that implement this trait.
Required Associated Constants§
Required Methods§
Sourcefn detokenize<I, D>(topics: I) -> Result<Self::RustType>
fn detokenize<I, D>(topics: I) -> Result<Self::RustType>
Detokenize the topics into a tuple of rust types.
This function accepts an iterator of WordToken
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.