1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use serde::Serialize; #[derive(Serialize)] pub struct LoginUser { email: String, password: String, } impl LoginUser { pub fn new(email: &str, password: &str) -> Self { Self { email: email.to_string(), password: password.to_string(), } } }