pub struct StoredPatch {
pub start: usize,
pub end: usize,
pub before: String,
pub after: String,
pub context_before: Option<String>,
pub context_after: Option<String>,
}Expand description
A journaled replacement: start..end is the span of after in the
post-image; context_before/context_after are the post-image bytes
around it (the rest of its lines plus one line each way), used to find the
span again if the file changed elsewhere before undo.
Fields§
§start: usize§end: usize§before: String§after: String§context_before: Option<String>§context_after: Option<String>Trait Implementations§
Source§impl Clone for StoredPatch
impl Clone for StoredPatch
Source§impl Debug for StoredPatch
impl Debug for StoredPatch
Source§impl<'de> Deserialize<'de> for StoredPatch
impl<'de> Deserialize<'de> for StoredPatch
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 StoredPatch
Source§impl PartialEq for StoredPatch
impl PartialEq for StoredPatch
Source§impl Serialize for StoredPatch
impl Serialize for StoredPatch
impl StructuralPartialEq for StoredPatch
Auto Trait Implementations§
impl Freeze for StoredPatch
impl RefUnwindSafe for StoredPatch
impl Send for StoredPatch
impl Sync for StoredPatch
impl Unpin for StoredPatch
impl UnsafeUnpin for StoredPatch
impl UnwindSafe for StoredPatch
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