pub struct RecordDescriptor;Expand description
Header length made up of fields for message length, message type, and then the encoded message.
Writing of the record length signals the message recording is complete.
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |R| Record Length | +-+-------------------------------------------------------------+ | Type | +---------------------------------------------------------------+ | Encoded Message ... ... | +---------------------------------------------------------------+
Implementations§
Source§impl RecordDescriptor
impl RecordDescriptor
pub const HEADER_LENGTH: Index = 8i32
pub const ALIGNMENT: Index = 8i32
pub const PADDING_MSG_TYPE_ID: Index = -1i32
pub fn length_offset(record_offset: Index) -> Index
pub fn type_offset(record_offset: Index) -> Index
pub fn encoded_msg_offset(record_offset: Index) -> Index
pub fn make_header(length: i32, msg_type_id: i32) -> i64
pub fn record_length(header: i64) -> i32
pub fn message_type_id(header: i64) -> i32
pub fn check_msg_type_id(msg_type_id: i32)
Auto Trait Implementations§
impl Freeze for RecordDescriptor
impl RefUnwindSafe for RecordDescriptor
impl Send for RecordDescriptor
impl Sync for RecordDescriptor
impl Unpin for RecordDescriptor
impl UnwindSafe for RecordDescriptor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more