PSArc_lib/traits/
parse.rs

1use crate::traits::ConvertAsBytes;
2
3/// **Parsable** means that the item is parsable from raw bytes to itself
4pub trait Parsable {
5	/// **Error** should be whatever your return error type is
6	type Error;
7	/// **parse** converts raw bytes to itself
8	fn parse(bytes: impl ConvertAsBytes) -> Result<Self, Self::Error> where Self: Sized;
9}