pub enum Preview {
Write {
path: String,
bytes: u64,
replaces: bool,
lines: Vec<DiffLine>,
more: usize,
},
Move {
moves: Vec<(String, String)>,
more: usize,
},
Delete {
path: String,
what: String,
},
Args {
fields: Vec<(String, String)>,
code: Option<String>,
more: usize,
},
Other,
}Expand description
A readable account of a tool call, built from its (untrusted, bounded) arguments.
Variants§
Write
Create or replace a file. lines is the start of the new content, or for a
replacement a compact line diff against the current file.
Fields
Move
Move or rename: (from, to) pairs.
Delete
Move something to the trash; what describes it, e.g. “file, 2.1 KB”.
Args
Any other tool: its key arguments. code is command/script text, shown monospaced.
Other
A preview a newer engine sends that this client doesn’t know (not shown).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Preview
impl<'de> Deserialize<'de> for Preview
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 Eq for Preview
impl StructuralPartialEq for Preview
Auto Trait Implementations§
impl Forget for Preview
impl Freeze for Previewwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<DiffLine>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for Preview
impl RefUnwindSafe for Preview
impl Send for Previewwhere
RawVecInner: Send,
impl Sync for Previewwhere
RawVecInner: Sync,
impl Unpin for Preview
impl UnsafeUnpin for Previewwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<DiffLine>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for Previewwhere
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