Skip to main content

ToTopic

Trait ToTopic 

Source
pub trait ToTopic {
    // Required method
    fn to_topic(&self) -> H256;
}
Expand description

Only items implementing ToTopic may be used as #[indexed] field in crate::ToLog macro usage.

See also (solidity docs on events)[https://docs.soliditylang.org/en/develop/contracts.html#events]

Required Methods§

Source

fn to_topic(&self) -> H256

Convert value to topic to be used in ethereum::Log

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ToTopic for H256

Source§

fn to_topic(&self) -> H256

Source§

impl ToTopic for U256

Source§

fn to_topic(&self) -> H256

Source§

impl ToTopic for u32

Source§

fn to_topic(&self) -> H256

Implementors§