pub struct Patch {
pub files: Vec<FilePath>,
pub decoder: Option<DecodeBy>,
pub encoder: Option<EncodeBy>,
pub patch_area: Vec<AreaRule>,
pub replace: Option<Replacer>,
pub insert: Option<String>,
}
Expand description
Patch definition.
Fields§
§files: Vec<FilePath>
Rules to define patchable files.
decoder: Option<DecodeBy>
Decode file content by decoder before patching.
Useful on patching non-plain text or even non-text files.
encoder: Option<EncodeBy>
Encode file content by encoder after patching.
Useful on patching non-plain text or even non-text files.
patch_area: Vec<AreaRule>
List of rules to define patch area and cursor position.
Allows to patch only defined content area.
replace: Option<Replacer>
Replaces some content inside patch area.
insert: Option<String>
Inserts some content at cursor position.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Patch
impl<'de> Deserialize<'de> for Patch
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 Patch
Auto Trait Implementations§
impl Freeze for Patch
impl RefUnwindSafe for Patch
impl Send for Patch
impl Sync for Patch
impl Unpin for Patch
impl UnwindSafe for Patch
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