use std::net::TcpStream; /// Represent one single chat user and their network stuff pub struct ChatUser { /// user id pub id: u64, /// Name of the chat user pub name: String, /// TCPStream socket object thingy pub socket: TcpStream, } impl ChatUser { pub fn new(id: u64, name: String, socket: TcpStream) -> Self { Self { id, name, socket } } }