2019-06-08 18:06:10 -07:00
|
|
|
mod crypto;
|
2019-06-06 16:46:23 -07:00
|
|
|
mod patch;
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq)]
|
|
|
|
pub enum PacketParseError {
|
|
|
|
NotEnoughBytes,
|
|
|
|
WrongPacketCommand,
|
2019-05-29 22:34:00 -07:00
|
|
|
}
|
2019-06-06 16:46:23 -07:00
|
|
|
|
|
|
|
|
|
|
|
pub trait PSOPacket {
|
|
|
|
fn from_bytes(data: &Vec<u8>) -> Result<Self, PacketParseError> where Self: Sized;
|
|
|
|
fn as_bytes(&self) -> Vec<u8>;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|