feat(auth): finish protocol 10 method 2 and 3

This commit is contained in:
DJMrTV 2025-02-02 20:25:22 +01:00
commit d18ba43aed
24 changed files with 490 additions and 43 deletions

View file

@ -0,0 +1,21 @@
use std::io::{Read, Write};
use bytemuck::bytes_of;
use crate::rmc::structures::RmcSerialize;
impl<T: RmcSerialize> RmcSerialize for Vec<T>{
fn serialize(&self, writer: &mut dyn Write) -> crate::rmc::structures::Result<()> {
let u32_len = self.len();
writer.write_all(bytes_of(&u32_len))?;
for e in self{
e.serialize(writer)?;
}
Ok(())
}
fn deserialize(reader: &mut dyn Read) -> crate::rmc::structures::Result<Self> {
todo!()
}
}