We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac2726d commit b866e57Copy full SHA for b866e57
1 file changed
src/primaryheader.rs
@@ -44,7 +44,7 @@ pub struct PrimaryHeader {
44
45
impl PrimaryHeader {
46
47
- fn parse(raw: &[u8]) -> ParseResult<(PrimaryHeader, Vec<u8>)> {
+ pub fn parse(raw: &[u8]) -> ParseResult<(PrimaryHeader, Vec<u8>)> {
48
let mut reader = Cursor::new(raw.to_vec());
49
50
let header_0 = reader.read_u16::<BigEndian>()?;
@@ -73,7 +73,7 @@ impl PrimaryHeader {
73
}, remaining))
74
}
75
76
- fn to_bytes(&self) -> ParseResult<Vec<u8>> {
+ pub fn to_bytes(&self) -> ParseResult<Vec<u8>> {
77
let mut bytes = vec![];
78
//TODO: look into this two-stage casting from enum to u16
79
let header_0: u16 = (self.app_proc_id) as u16
0 commit comments