Skip to content

Commit b866e57

Browse files
committed
make parse and to_bytes functions public so they are usable
1 parent ac2726d commit b866e57

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/primaryheader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pub struct PrimaryHeader {
4444

4545
impl PrimaryHeader {
4646

47-
fn parse(raw: &[u8]) -> ParseResult<(PrimaryHeader, Vec<u8>)> {
47+
pub fn parse(raw: &[u8]) -> ParseResult<(PrimaryHeader, Vec<u8>)> {
4848
let mut reader = Cursor::new(raw.to_vec());
4949

5050
let header_0 = reader.read_u16::<BigEndian>()?;
@@ -73,7 +73,7 @@ impl PrimaryHeader {
7373
}, remaining))
7474
}
7575

76-
fn to_bytes(&self) -> ParseResult<Vec<u8>> {
76+
pub fn to_bytes(&self) -> ParseResult<Vec<u8>> {
7777
let mut bytes = vec![];
7878
//TODO: look into this two-stage casting from enum to u16
7979
let header_0: u16 = (self.app_proc_id) as u16

0 commit comments

Comments
 (0)