pub enum DisplaySegment {
Text(String),
Diff(DiffContent),
Image(ImageContent),
}Expand description
A segment of display content for human-facing UIs.
Variants§
Text(String)
Plain text display.
Diff(DiffContent)
A unified diff.
Image(ImageContent)
An inline image (e.g. an image file read by a tool). Clients that cannot render images should skip this segment and fall back to the next supported one.
Trait Implementations§
Source§impl Clone for DisplaySegment
impl Clone for DisplaySegment
Source§fn clone(&self) -> DisplaySegment
fn clone(&self) -> DisplaySegment
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DisplaySegment
impl Debug for DisplaySegment
Source§impl<'de> Deserialize<'de> for DisplaySegment
impl<'de> Deserialize<'de> for DisplaySegment
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
Auto Trait Implementations§
impl Freeze for DisplaySegment
impl RefUnwindSafe for DisplaySegment
impl Send for DisplaySegment
impl Sync for DisplaySegment
impl Unpin for DisplaySegment
impl UnsafeUnpin for DisplaySegment
impl UnwindSafe for DisplaySegment
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