use seripack::packet::Packet;
use seripack::router::{PacketId};
#[test]
fn test_routing() {
#[derive(Debug)]
pub struct TestPacket {}
impl TestPacket { const HEADER: PacketId = 0; }
impl Packet for TestPacket {}
pub fn recv_test(packet: TestPacket) {
println!("We got a sane test packet from routing! {:?}", packet);
}
pub fn recv_test_manual(pure_packet: Box<dyn Packet>) {
let packet = pure_packet.downcast_ref::<TestPacket>().unwrap();
println!("We got a sane test packet from routing! {:?}", packet);
}
}