pub trait IntoTopic {
// Required method
fn into_topic(&self) -> TopicSrc<'_>;
}Expand description
Trait for types that can be converted into an event topic.
u32, u64, u128 and U256 use zero-extended, 32-byte big-endian encoding.
i32, i64, i128 and I256 use sign-extended, 32-byte big-endian encoding.
bool uses the same representation for 0 or 1. Other primitive integer types
are not supported as topics.
Byte arrays of length 32, addresses and hashes borrow their bytes directly.
Strings and byte slices are always XDR-encoded and SHA-256 hashed.
Required Methods§
fn into_topic(&self) -> TopicSrc<'_>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".