pub struct Summary {
pub text: String,
}Expand description
Summary sub-block — a compact UTF-8 description prefixed to the body
when the block’s HAS_SUMMARY flag is set.
The summary is designed for token-budget-aware rendering: when a block is too large to include in full, the renderer can substitute the summary to preserve context without blowing the token budget.
Wire layout (within the block body, before any TLV fields):
┌─────────────────────────────────────────────────────┐
│ summary_len (varint) — byte length of text │
│ summary_text [summary_len] — UTF-8 bytes │
│ ... remaining TLV fields ... │
└─────────────────────────────────────────────────────┘The summary is always the first thing in the body when present. The
decoder checks BlockFlags::has_summary() before attempting to read it.
Fields§
§text: StringImplementations§
Trait Implementations§
impl Eq for Summary
impl StructuralPartialEq for Summary
Auto Trait Implementations§
impl Freeze for Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnsafeUnpin for Summary
impl UnwindSafe for Summary
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