pub struct EditJson {
pub line: usize,
pub col: usize,
pub end_line: usize,
pub end_col: usize,
pub text: String,
}Expand description
One replacement in a FixJson: a half-open span and what goes there.
Positions are the checker’s — lines and columns counted from 1 — rather than byte offsets, because that is what the diagnostic beside it says and an entry that stored them differently would have to be trusted to convert the same way twice.
Fields§
§line: usizeFirst line of the span.
col: usizeFirst column of the span, inclusive.
end_line: usizeLast line of the span; the same as line for an edit inside one line.
end_col: usizeColumn the span stops before, exclusive — so an empty span is an insertion.
text: StringWhat replaces the span. Empty to delete it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EditJson
impl<'de> Deserialize<'de> for EditJson
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
Auto Trait Implementations§
impl Freeze for EditJson
impl RefUnwindSafe for EditJson
impl Send for EditJson
impl Sync for EditJson
impl Unpin for EditJson
impl UnsafeUnpin for EditJson
impl UnwindSafe for EditJson
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more