Trait libp2p::gossipsub::Hasher

pub trait Hasher {
    // Required method
    fn hash(topic_string: String) -> TopicHash;
}
Available on crate feature gossipsub only.
Expand description

A generic trait that can be extended for various hashing types for a topic.

Required Methods§

fn hash(topic_string: String) -> TopicHash

The function that takes a topic string and creates a topic hash.

Object Safety§

This trait is not object safe.

Implementors§