pub struct DiffReviewContent {
pub content: String,
pub truncation_level: DiffTruncationLevel,
pub total_file_count: usize,
pub shown_file_count: Option<usize>,
pub baseline_oid: Option<String>,
pub baseline_short: Option<String>,
pub baseline_description: String,
}Expand description
The result of diff truncation for review purposes.
Contains both the potentially-truncated content and metadata about what truncation was applied, along with version context information.
Fields§
§content: StringThe content to include in the review prompt
truncation_level: DiffTruncationLevelThe level of truncation applied
total_file_count: usizeTotal number of files in the full diff (for context in messages)
shown_file_count: Option<usize>Number of files shown in the abbreviated content (if applicable)
baseline_oid: Option<String>The OID (commit SHA) that this diff is compared against (baseline)
baseline_short: Option<String>Short form (first 8 chars) of the baseline OID for display
baseline_description: StringDescription of what the baseline represents (e.g., “review_baseline”, “start_commit”)
Implementations§
Source§impl DiffReviewContent
impl DiffReviewContent
Sourcepub fn format_context_header(&self) -> String
pub fn format_context_header(&self) -> String
Generate a human-readable header describing the diff’s version context.
This header is meant to be included at the beginning of the diff content to provide clarity about what state of the code the diff represents.
§Returns
A formatted string like:
Diff Context: Compared against review_baseline abc12345
Current state: Working directory (includes unstaged changes)If no baseline information is available, returns a generic message.
Trait Implementations§
Source§impl Clone for DiffReviewContent
impl Clone for DiffReviewContent
Source§fn clone(&self) -> DiffReviewContent
fn clone(&self) -> DiffReviewContent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DiffReviewContent
impl Debug for DiffReviewContent
Source§impl PartialEq for DiffReviewContent
impl PartialEq for DiffReviewContent
impl Eq for DiffReviewContent
impl StructuralPartialEq for DiffReviewContent
Auto Trait Implementations§
impl Freeze for DiffReviewContent
impl RefUnwindSafe for DiffReviewContent
impl Send for DiffReviewContent
impl Sync for DiffReviewContent
impl Unpin for DiffReviewContent
impl UnwindSafe for DiffReviewContent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more