use std::io::Result; pub struct PortPayload { pub port: u8, pub payload: Vec, } pub trait Downlink { fn serialise(&self) -> Result; } pub trait Uplink { fn deserialise(input: &PortPayload) -> Result where Self: Sized; }