Trait Parsable

Source
pub trait Parsable {
    type Error;

    // Required method
    fn parse(bytes: impl ConvertAsBytes) -> Result<Self, Self::Error>
       where Self: Sized;
}
Expand description

Parsable means that the item is parsable from raw bytes to itself

Required Associated Types§

Source

type Error

Error should be whatever your return error type is

Required Methods§

Source

fn parse(bytes: impl ConvertAsBytes) -> Result<Self, Self::Error>
where Self: Sized,

parse converts raw bytes to itself

Implementors§

Source§

impl Parsable for PSArchiveCompression

Should parse 4 bytes, any more or less will result in an error

Source§

impl Parsable for PSArchiveFlags

Should parse 4 bytes, any more or less will result in an error

Source§

impl Parsable for PSArchive

Source§

impl Parsable for PSArchiveTOC

Source§

impl Parsable for PSArchiveVersion