pub struct FileResult {
pub path: String,
pub content: Option<String>,
pub language: Option<String>,
pub total_lines: Option<u32>,
pub version_hash: Option<String>,
pub error: Option<String>,
}Expand description
Result for a single file in read_files.
Fields§
§path: StringFile path.
content: Option<String>File content (None if error).
language: Option<String>Language of the file (e.g., “rust”, “typescript”, “toml”).
total_lines: Option<u32>Total number of lines in the file (before truncation).
version_hash: Option<String>Short content fingerprint of the file (7-char hex, derived from SHA-256).
Use for change detection: if the hash differs from a previous call, the file has been modified. Not a full SHA-256 digest — compare as opaque strings only.
error: Option<String>Error message if file could not be read (e.g., “file not found”, “sandbox denied”).
Trait Implementations§
Source§impl Clone for FileResult
impl Clone for FileResult
Source§fn clone(&self) -> FileResult
fn clone(&self) -> FileResult
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 FileResult
impl Debug for FileResult
Source§impl<'de> Deserialize<'de> for FileResult
impl<'de> Deserialize<'de> for FileResult
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 JsonSchema for FileResult
impl JsonSchema for FileResult
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 moreAuto Trait Implementations§
impl Freeze for FileResult
impl RefUnwindSafe for FileResult
impl Send for FileResult
impl Sync for FileResult
impl Unpin for FileResult
impl UnsafeUnpin for FileResult
impl UnwindSafe for FileResult
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