mirror of
https://github.com/logos-messaging/logos-messaging-rust-bindings.git
synced 2026-01-02 14:03:12 +00:00
* update nwaku vendor to v0.33.1 * build.rs: add negentropy dependency and cmdCount cmdLine dependencies * fix: call waku_setup when instantiating waku_new * Properly decode a Vec<Multiaddr> * First commit tic-tac-toe * adding some simple game logic to coordinate the turns a little * some logic to panic if a proper event callback hasn't been set * restoring back the type state pattern introduced by Richard * new PubsubTopic type * fix clippy issues --------- Co-authored-by: Richard Ramos <info@richardramos.me>
17 lines
397 B
Rust
17 lines
397 B
Rust
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
|
pub struct PubsubTopic(String);
|
|
|
|
impl PubsubTopic {
|
|
// Constructor to create a new MyString
|
|
pub fn new(value: &str) -> Self {
|
|
PubsubTopic(value.to_string())
|
|
}
|
|
}
|
|
|
|
// to allow conversion from `PubsubTopic` to `String`
|
|
impl From<&PubsubTopic> for String {
|
|
fn from(topic: &PubsubTopic) -> Self {
|
|
topic.0.to_string()
|
|
}
|
|
}
|