pub enum DiffContent {
UnifiedDiff {
content: String,
},
CreateFile {
content: String,
},
DeleteFile,
BinarySummary {
mime_type: String,
size_bytes: u64,
hash: String,
},
}Expand description
The actual content of a change.
Rust enums can carry different data per variant — this is called a “tagged union” or “sum type”. In JSON, serde uses a “type” tag to distinguish variants.
Variants§
UnifiedDiff
A standard unified diff (like git diff output).
CreateFile
A brand new file is being created.
Fields
DeleteFile
A file is being deleted entirely.
BinarySummary
Summary for a binary file (no text diff possible).
Trait Implementations§
Source§impl Clone for DiffContent
impl Clone for DiffContent
Source§fn clone(&self) -> DiffContent
fn clone(&self) -> DiffContent
Returns a duplicate of the value. Read more
1.0.0 · 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 DiffContent
impl Debug for DiffContent
Source§impl<'de> Deserialize<'de> for DiffContent
impl<'de> Deserialize<'de> for DiffContent
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 PartialEq for DiffContent
impl PartialEq for DiffContent
Source§impl Serialize for DiffContent
impl Serialize for DiffContent
impl StructuralPartialEq for DiffContent
Auto Trait Implementations§
impl Freeze for DiffContent
impl RefUnwindSafe for DiffContent
impl Send for DiffContent
impl Sync for DiffContent
impl Unpin for DiffContent
impl UnsafeUnpin for DiffContent
impl UnwindSafe for DiffContent
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