pub struct WorkspacePatchSuccessChange {
pub path: String,
pub op: Option<WorkspacePatchOperationKind>,
pub hunks: usize,
pub lines_before: Option<usize>,
pub lines_after: Option<usize>,
pub bytes_before: usize,
pub bytes_after: usize,
pub ignored_context_hunks: usize,
pub lines: Vec<WorkspacePatchSuccessLine>,
}Expand description
One file change inside a successful apply_patch result.
Fields§
§path: StringWorkspace-relative path using / separators.
op: Option<WorkspacePatchOperationKind>File operation, absent in envelopes recorded before it was reported, which only ever described updates.
hunks: usize§lines_before: Option<usize>Line counts, absent in envelopes recorded before line counts existed.
lines_after: Option<usize>§bytes_before: usize§bytes_after: usize§ignored_context_hunks: usizeContext-only hunks that were dropped from this file’s update sections.
lines: Vec<WorkspacePatchSuccessLine>Hunk lines of the change, empty for an add or delete.
Implementations§
Source§impl WorkspacePatchSuccessChange
impl WorkspacePatchSuccessChange
Sourcepub fn operation(&self) -> WorkspacePatchOperationKind
pub fn operation(&self) -> WorkspacePatchOperationKind
Resolves the file operation.
An envelope recorded before the operation was reported only ever described updates, so an absent operation is an update.
Trait Implementations§
Source§impl Clone for WorkspacePatchSuccessChange
impl Clone for WorkspacePatchSuccessChange
Source§impl Debug for WorkspacePatchSuccessChange
impl Debug for WorkspacePatchSuccessChange
Source§impl<'de> Deserialize<'de> for WorkspacePatchSuccessChange
impl<'de> Deserialize<'de> for WorkspacePatchSuccessChange
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 WorkspacePatchSuccessChange
impl StructuralPartialEq for WorkspacePatchSuccessChange
Auto Trait Implementations§
impl Forget for WorkspacePatchSuccessChange
impl Freeze for WorkspacePatchSuccessChangewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<WorkspacePatchSuccessLine>: Freeze,
impl Move for WorkspacePatchSuccessChange
impl RefUnwindSafe for WorkspacePatchSuccessChange
impl Send for WorkspacePatchSuccessChangewhere
RawVecInner: Send,
impl Sync for WorkspacePatchSuccessChangewhere
RawVecInner: Sync,
impl Unpin for WorkspacePatchSuccessChange
impl UnsafeUnpin for WorkspacePatchSuccessChangewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<WorkspacePatchSuccessLine>: UnsafeUnpin,
impl UnwindSafe for WorkspacePatchSuccessChangewhere
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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
Compare self to
key and return true if they are equal.