pub enum Block {
Heading {
level: u8,
text: String,
},
Paragraph {
text: String,
},
Line {
text: String,
},
Separator,
List {
ordered: bool,
items: Vec<String>,
},
Code {
language: Option<String>,
code: String,
},
Table {
title: Option<String>,
table: Table,
},
Json {
value: Value,
},
KeyValue {
entries: Vec<KeyValueEntry>,
},
DefinitionList {
entries: Vec<DefinitionEntry>,
},
Status {
kind: StatusKind,
text: String,
},
StyledText {
text: String,
style: TextStyle,
},
}Expand description
A content block within an output.
Blocks are rendered according to the configured format (Markdown, JSON, etc.).
Variants§
Heading
Heading at the specified level (1-6).
Paragraph
A paragraph of text.
Line
A single line of text.
Separator
A visual separator/divider.
List
An ordered or unordered list.
Code
A code block with optional language hint.
Table
A structured data table.
Json
Raw JSON data.
KeyValue
Key-value pairs.
Fields
§
entries: Vec<KeyValueEntry>DefinitionList
Term definitions.
Fields
§
entries: Vec<DefinitionEntry>Status
Status indicator (ok, warning, error).
StyledText
Styled text block.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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