#[non_exhaustive]pub struct FileChange {
pub path: String,
pub op: FileOp,
pub before_hash: Option<String>,
pub after_hash: Option<String>,
pub before_bytes: Option<u64>,
pub after_bytes: u64,
pub added: u64,
pub removed: u64,
pub unified_diff: Option<String>,
pub truncated: bool,
pub omitted: Option<DiffOmitted>,
}Expand description
One file a tool call wrote, as tool_result reports it to the host.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: StringThe resolved write target, absolute.
op: FileOp§before_hash: Option<String>sha256:<hex> of the content before; None when there was none or
it was too large to hash.
after_hash: Option<String>§before_bytes: Option<u64>§after_bytes: u64§added: u64§removed: u64§unified_diff: Option<String>--- a/<path> / +++ b/<path>, three lines of context.
truncated: boolThe diff stops at a hunk boundary short of the whole change.
omitted: Option<DiffOmitted>Why there is no diff, when there is none.
Implementations§
Trait Implementations§
Source§impl Clone for FileChange
impl Clone for FileChange
Source§impl Debug for FileChange
impl Debug for FileChange
Source§impl<'de> Deserialize<'de> for FileChange
impl<'de> Deserialize<'de> for FileChange
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 FileChange
Source§impl JsonSchema for FileChange
impl JsonSchema for FileChange
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for FileChange
impl PartialEq for FileChange
Source§impl Serialize for FileChange
impl Serialize for FileChange
impl StructuralPartialEq for FileChange
Auto Trait Implementations§
impl Forget for FileChange
impl Freeze for FileChange
impl Move for FileChange
impl RefUnwindSafe for FileChange
impl Send for FileChange
impl Sync for FileChange
impl Unpin for FileChange
impl UnsafeUnpin for FileChange
impl UnwindSafe for FileChange
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