/// This is the lowset-level data transmission type pub trait Connection: Send + Sync { type Error: std::fmt::Debug; fn read(&mut self) -> Result; fn write(&mut self, data: &str) -> Result<(), Self::Error>; } pub trait ServerTrait { type Error: std::fmt::Debug; fn accept(&mut self) -> Result; fn bind(address: &str) -> Result where Self: Sized; } pub trait ClientTrait { type Error: std::fmt::Debug; fn connect(address: &str) -> Result; } mod tcp; pub use tcp::TCPClient; pub use tcp::TCPConnection; pub use tcp::TCPServer;