pub struct OptionPreview {
pub content: String,
pub language: Option<String>,
pub diff: bool,
}Expand description
A per-option preview payload (Stage 2). The model supplies the content; the
tool only renders it. diff switches on +/- line coloring for showing
the change an option would produce — the standout for a coding agent.
Fields§
§content: StringThe preview body, rendered as monospace lines.
language: Option<String>Language hint (e.g. “rust”, “yaml”). Reserved for future syntax highlighting; today the body renders as plain monospace.
diff: boolRender content as a unified diff: + lines green, - lines red,
@@ hunk headers cyan.
Trait Implementations§
Source§impl Clone for OptionPreview
impl Clone for OptionPreview
Source§fn clone(&self) -> OptionPreview
fn clone(&self) -> OptionPreview
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 OptionPreview
impl Debug for OptionPreview
Source§impl<'de> Deserialize<'de> for OptionPreview
impl<'de> Deserialize<'de> for OptionPreview
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
Source§impl PartialEq for OptionPreview
impl PartialEq for OptionPreview
Source§impl Serialize for OptionPreview
impl Serialize for OptionPreview
impl StructuralPartialEq for OptionPreview
Auto Trait Implementations§
impl Freeze for OptionPreview
impl RefUnwindSafe for OptionPreview
impl Send for OptionPreview
impl Sync for OptionPreview
impl Unpin for OptionPreview
impl UnsafeUnpin for OptionPreview
impl UnwindSafe for OptionPreview
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