feat(protocols): extend functionality of protocol macro

This commit is contained in:
DJMrTV 2025-02-01 19:42:45 +01:00
commit 1679590bf3
6 changed files with 38 additions and 12 deletions

View file

@ -1,14 +1,17 @@
struct Account{
pub struct Account{
pid: u32,
username: Box<str>,
kerbros_password: Box<str>,
}
impl Account{
const fn new(pid: u32, passwd: &str) -> Self{
pub fn new(pid: u32, username: &str, passwd: &str) -> Self{
Self{
kerbros_password: passwd.into(),
username: username.into(),
pid
}
}