Skip to main content

topic_id

Function topic_id 

Source
pub fn topic_id(name: &str) -> TopicId
Expand description

Compute a TopicId from a topic name string.

use ma_core::topic::topic_id;

let id = topic_id("/ma/broadcast/0.0.1");
assert_eq!(id, *blake3::hash(b"/ma/broadcast/0.0.1").as_bytes());