Skip to main content

WriteFrame

Trait WriteFrame 

Source
pub trait WriteFrame {
    // Required methods
    fn bytes(&self) -> &[u8] ⓘ;
    fn retained_bytes(&self) -> RetainedBytes;
}
Expand description

A complete outbound frame with explicit retained-memory accounting.

The byte contents and length must remain stable for the entire period that Bornera owns the value. Retained memory is sampled once at commit. A later byte-length change is rejected explicitly rather than indexed unchecked; same-length content mutation remains a caller contract violation that Bornera cannot mechanically detect without copying the frame.

Required Methods§

Source

fn bytes(&self) -> &[u8] ⓘ

Returns the contiguous bytes still interpreted only by the transport.

Source

fn retained_bytes(&self) -> RetainedBytes

Returns all variable memory retained while this frame remains owned.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§