pub struct Diff {
pub common: Common,
pub patch: Option<String>,
pub old: Option<String>,
pub new: Option<String>,
pub path: Option<String>,
pub context: Option<u16>,
pub mode: Option<DiffMode>,
}Expand description
A unified patch, or old/new text pairs (§4.5.2).
Fields§
§common: CommonCommon node props (key, style, block, fallback).
patch: Option<String>Unified diff patch (either this, or old + new).
old: Option<String>Old text (with new).
new: Option<String>New text (with old).
path: Option<String>File path shown in the header.
context: Option<u16>Context lines for old/new (default 3).
mode: Option<DiffMode>Layout mode.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Diff
impl<'de> Deserialize<'de> for Diff
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 StructuralPartialEq for Diff
Source§impl WithCommon for Diff
impl WithCommon for Diff
Source§fn common_mut(&mut self) -> &mut Common
fn common_mut(&mut self) -> &mut Common
Mutable access to the node’s common props.
Source§fn block(self, block: impl Into<BlockProps>) -> Self
fn block(self, block: impl Into<BlockProps>) -> Self
Sets the surrounding block.
Auto Trait Implementations§
impl Freeze for Diff
impl RefUnwindSafe for Diff
impl Send for Diff
impl Sync for Diff
impl Unpin for Diff
impl UnsafeUnpin for Diff
impl UnwindSafe for Diff
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