pub struct ChangeEntry {
pub file: Option<String>,
pub lines_added: Option<i64>,
pub lines_removed: Option<i64>,
}Expand description
One entry of the optional changes array.
Why: Lets the model report which files it touched without the caller having
to re-parse a diff out of prose. Every field is optional (including file)
because the JSON schema does not mark any of them required inside the
array item — a partially-populated entry must still deserialise rather than
hard-failing execute for something the schema-level validator already let
through.
What: file, lines_added, lines_removed — all Option.
Test: tests::execute_with_changes_and_tests_renders_all_fields.
Fields§
§file: Option<String>Path of the changed file, if reported.
lines_added: Option<i64>Lines added, if reported.
lines_removed: Option<i64>Lines removed, if reported.
Trait Implementations§
Source§impl Clone for ChangeEntry
impl Clone for ChangeEntry
Source§fn clone(&self) -> ChangeEntry
fn clone(&self) -> ChangeEntry
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 ChangeEntry
impl Debug for ChangeEntry
Source§impl<'de> Deserialize<'de> for ChangeEntry
impl<'de> Deserialize<'de> for ChangeEntry
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
Auto Trait Implementations§
impl Freeze for ChangeEntry
impl RefUnwindSafe for ChangeEntry
impl Send for ChangeEntry
impl Sync for ChangeEntry
impl Unpin for ChangeEntry
impl UnsafeUnpin for ChangeEntry
impl UnwindSafe for ChangeEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.