This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::time::Duration; | |
use kameo::prelude::*; | |
use libp2p::{ | |
Multiaddr, SwarmBuilder, | |
futures::{StreamExt, channel::oneshot}, | |
swarm::SwarmEvent, | |
tcp, | |
}; | |
use serde::{Deserialize, Serialize}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Kademila Distributed Hash Table Bootstrap Node | |
use std::{sync::Arc, time::Duration}; | |
use kameo::prelude::*; | |
use libp2p::{ | |
Multiaddr, SwarmBuilder, futures::StreamExt, identity::ed25519, swarm::SwarmEvent, tcp, | |
}; | |
use serde::{Deserialize, Serialize}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct TrafficLight { | |
struct Red {}; | |
struct Green {}; | |
struct Yellow {}; | |
using Context = Enum<Red, Green, Yellow>; | |
Context _context = Red{}; | |
using I = Enum<Time::DelayFor, Time::Now>; |