From b187041d9e053989957f20df3f8589dd7165eb33 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Fri, 23 Jul 2021 02:02:05 +0700 Subject: [PATCH] Move documentation for `MessageReader` --- src/link/mod.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) 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 {