pub struct SpanReplacement {
pub file: Utf8PathBuf,
pub start_line: u32,
pub end_line: u32,
pub replacement: String,
}Expand description
One contiguous, line-bounded replacement in a single file.
Lines are one-based and inclusive. replacement becomes the new content for
lines start_line..=end_line; line content is replaced, while the newline
that terminates the last line and all surrounding lines are preserved.
Fields§
§file: Utf8PathBufFile to edit, relative to the workspace root.
start_line: u32One-based first line to replace.
end_line: u32One-based last line to replace.
replacement: StringNew content spliced over the line range.
Trait Implementations§
Source§impl Clone for SpanReplacement
impl Clone for SpanReplacement
Source§fn clone(&self) -> SpanReplacement
fn clone(&self) -> SpanReplacement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SpanReplacement
impl Debug for SpanReplacement
Source§impl<'de> Deserialize<'de> for SpanReplacement
impl<'de> Deserialize<'de> for SpanReplacement
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 SpanReplacement
Source§impl PartialEq for SpanReplacement
impl PartialEq for SpanReplacement
Source§fn eq(&self, other: &SpanReplacement) -> bool
fn eq(&self, other: &SpanReplacement) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SpanReplacement
impl Serialize for SpanReplacement
impl StructuralPartialEq for SpanReplacement
Auto Trait Implementations§
impl Freeze for SpanReplacement
impl RefUnwindSafe for SpanReplacement
impl Send for SpanReplacement
impl Sync for SpanReplacement
impl Unpin for SpanReplacement
impl UnsafeUnpin for SpanReplacement
impl UnwindSafe for SpanReplacement
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