|
|
@ -7,7 +7,7 @@ pub mod packet; |
|
|
|
pub mod character;
|
|
|
|
pub mod util;
|
|
|
|
|
|
|
|
use std::io::Read;
|
|
|
|
use std::io::{Read, Seek};
|
|
|
|
#[derive(Debug, PartialEq)]
|
|
|
|
pub enum PacketParseError {
|
|
|
|
NotEnoughBytes,
|
|
|
@ -21,7 +21,7 @@ pub enum PacketParseError { |
|
|
|
|
|
|
|
trait PSOPacketData {
|
|
|
|
//fn size(&self) -> usize;
|
|
|
|
fn from_bytes<R: Read>(cursor: &mut R) -> Result<Self, PacketParseError> where Self: Sized;
|
|
|
|
fn from_bytes<R: Read + Seek>(cursor: &mut R) -> Result<Self, PacketParseError> where Self: Sized;
|
|
|
|
fn as_bytes(&self) -> Vec<u8>;
|
|
|
|
}
|
|
|
|
|
|
|
|