diff --git a/src/link/mod.rs b/src/link/mod.rs index 9bc53c5..511473d 100644 --- a/src/link/mod.rs +++ b/src/link/mod.rs @@ -32,17 +32,6 @@ enum ReadingState { Payload, } -pub struct MessageReader { - is_broken: bool, - reading_state: ReadingState, - read_bytes: usize, - length_buffer: [u8; 4], - current_message_length: usize, - current_message: Vec, - read_messages: VecDeque, - ue_received_bytes: u64, -} - /// For converting byte stream that is expected from the ue-server into actual messages. /// Expected format is a sequence of either: /// 1. [HEAD_UE_RECEIVED: marker byte | 1 byte] @@ -54,6 +43,17 @@ pub struct MessageReader { /// never recovers from it. /// Use either `push_byte()` or `push()` to input byte stream from ue-server and `pop()` to /// retrieve resulting messages. +pub struct MessageReader { + is_broken: bool, + reading_state: ReadingState, + read_bytes: usize, + length_buffer: [u8; 4], + current_message_length: usize, + current_message: Vec, + read_messages: VecDeque, + ue_received_bytes: u64, +} + impl MessageReader { pub fn new() -> MessageReader { MessageReader {