pub enum FormatOutcome {
Unchanged,
Changed {
text: Arc<str>,
edits: Arc<[TextEdit]>,
},
Refused {
diagnostics: Arc<[Diagnostic]>,
},
}Expand description
The result of guarded full-document formatting.
Variants§
Unchanged
The source already matches the selected layout.
Changed
Formatting is safe and changes the source.
Fields
Refused
Formatting was not attempted because the source is unsafe to rewrite.
Fields
§
diagnostics: Arc<[Diagnostic]>Parse, version, or semantic errors responsible for the refusal.
Trait Implementations§
Source§impl Clone for FormatOutcome
impl Clone for FormatOutcome
Source§impl Debug for FormatOutcome
impl Debug for FormatOutcome
impl Eq for FormatOutcome
Source§impl PartialEq for FormatOutcome
impl PartialEq for FormatOutcome
impl StructuralPartialEq for FormatOutcome
Auto Trait Implementations§
impl Freeze for FormatOutcome
impl RefUnwindSafe for FormatOutcome
impl Send for FormatOutcome
impl Sync for FormatOutcome
impl Unpin for FormatOutcome
impl UnsafeUnpin for FormatOutcome
impl UnwindSafe for FormatOutcome
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