#[repr(C, align(64))]pub struct Frame {
pub header: FrameHeader,
pub payload: Bytes,
pub semantics: Option<SemanticMeta>,
}
Expand description
Zero-copy frame structure optimized for cache-line alignment
Fields§
§header: FrameHeader
Frame header with metadata
payload: Bytes
Payload as zero-copy bytes
semantics: Option<SemanticMeta>
Optional semantic annotations for optimization hints
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn with_semantics(payload: Bytes, semantics: SemanticMeta) -> Self
pub fn with_semantics(payload: Bytes, semantics: SemanticMeta) -> Self
Create frame with semantic hints for optimization
Sourcepub fn with_sequence(self, sequence: u64) -> Self
pub fn with_sequence(self, sequence: u64) -> Self
Set sequence number
Sourcepub fn with_schema(self, schema_id: SchemaId) -> Self
pub fn with_schema(self, schema_id: SchemaId) -> Self
Set schema ID for validation
Sourcepub fn with_compression(self) -> Self
pub fn with_compression(self) -> Self
Enable compression
Sourcepub fn with_checksum(self) -> Self
pub fn with_checksum(self) -> Self
Calculate and set checksum
Sourcepub fn is_numeric(&self) -> bool
pub fn is_numeric(&self) -> bool
Check if frame contains numeric array data
Sourcepub fn has_semantics(&self) -> bool
pub fn has_semantics(&self) -> bool
Check if frame has semantic hints
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnwindSafe for Frame
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