#[non_exhaustive]pub enum Fix {
RenameKey {
pointer: String,
to: String,
},
RemoveKey {
pointer: String,
},
SetString {
pointer: String,
value: String,
},
}Expand description
A structural edit lint_view_definition believes would resolve (or at
least meaningfully address) the Diagnostic it is attached to,
expressed purely in terms of an RFC 6901
JSON pointer — never a text position. This module never sees the
document’s source text (a browser’s CodeMirror instance does), so it
cannot offer a text edit; a pointer is the one location format both sides
agree on. #[non_exhaustive]: more fix shapes are expected as the lint
grows more rules with obvious one-click resolutions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RenameKey
Rename the object key at pointer to to, keeping its value.
pointer names the property, not its parent object (e.g.
/select/0/columns, for a columns key that should be column).
RemoveKey
Remove the object key at pointer entirely.
SetString
Replace the string value at pointer with value.
Trait Implementations§
impl Eq for Fix
impl StructuralPartialEq for Fix
Auto Trait Implementations§
impl Freeze for Fix
impl RefUnwindSafe for Fix
impl Send for Fix
impl Sync for Fix
impl Unpin for Fix
impl UnsafeUnpin for Fix
impl UnwindSafe for Fix
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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