freechat/server/src/payload.rs

14 lines
476 B
Rust

/* Module containg various structure which we use to pass back
* and forth from client/server as auth tokens
*/
// This structure allows us to provide some critical data for the client to reconnect to
// the server without having to go through a sign in process everytime
#[derive(Serialize, Deserialize, Debug)]
pub struct NewUserResponse {
pub userid: Option<u64>,
pub username: Option<String>,
pub key: Option<String>,
pub err: Option<&'static str>,
}