pub enum Block {
Text(ParsedText),
Code {
text: String,
language: Option<String>,
},
Quote {
content: ParsedText,
depth: u8,
},
Image {
token: u32,
size: Option<ImageSize>,
alt: String,
},
}Expand description
One piece of a message’s body.
Adding a kind of content is adding a variant here plus a measure arm
and a snapshot arm in the view — as opposed to xtext, where inline
media needed a discriminator on textentry, a side-allocated
xtext_media_data, a parallel render path, and a padding hack in the
line-count math.
Variants§
Text(ParsedText)
Code
A fenced markdown code block. Rendered monospace in a tinted panel, never wrapped mid-token, never parsed for other markup.
Quote
A markdown > quote. depth counts nesting.
Image
Server-validated inline media. texture is deliberately absent
from this crate — the layout engine only needs the size, and a
GdkTexture cannot cross into a GTK-free crate. The view keys its
own texture table off token.
Implementations§
Trait Implementations§
impl Eq for Block
impl StructuralPartialEq for Block
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