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§
Sourcefn bytes(&self) -> &[u8] ⓘ
fn bytes(&self) -> &[u8] ⓘ
Returns the contiguous bytes still interpreted only by the transport.
Sourcefn retained_bytes(&self) -> RetainedBytes
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".