pub struct Header {
pub flags: u16,
pub codec_id: u8,
pub header_len: u8,
pub schema_id: u64,
pub msg_type: u32,
pub msg_version: u16,
pub payload_len: u16,
}Expand description
Parsed v1 envelope header.
§Field invariants
header_lenis the declared length of the header prefix in bytes.- v1 decoding accepts values
>= V1_HEADER_LENand may ignore appended header bytes. - v1 encoding currently only supports
header_len == V1_HEADER_LEN.
- v1 decoding accepts values
payload_lenis the declared payload length in bytes.header_len + payload_lenis validated againstcrate::SLOT_CAPACITY.
Fields§
§flags: u16Envelope flags; see crate::flags.
codec_id: u8Codec identifier used to interpret the payload bytes.
header_len: u8Header length in bytes (append-only evolution).
schema_id: u64Schema identifier (application-defined).
msg_type: u32Message type identifier within a schema (application-defined).
msg_version: u16Message version within a schema/type (application-defined).
payload_len: u16Payload length in bytes.
Trait Implementations§
impl Copy for Header
impl Eq for Header
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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