pub enum Span {
Text(String),
Bold(Vec<Span>),
Italic(Vec<Span>),
Code(String),
Link {
href: String,
text: Vec<Span>,
},
LineBreak,
}Expand description
Inline markup. Kept minimal on purpose — bold, italic, code, links, breaks.
Adjacently tagged ({"type": "text", "value": "…"}) because the variants
wrap strings and sequences, which serde’s internal tagging cannot carry.
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Span
impl<'de> Deserialize<'de> for Span
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Forget for Span
impl Freeze for Span
impl Move for Span
impl RefUnwindSafe for Span
impl Send for Spanwhere
RawVecInner: Send,
impl Sync for Spanwhere
RawVecInner: Sync,
impl Unpin for Span
impl UnsafeUnpin for Spanwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Span>: UnsafeUnpin,
impl UnwindSafe for Spanwhere
RawVecInner: UnwindSafe,
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