pub enum FormatResult {
Formatted(String),
NoOp {
reason: String,
},
}Expand description
The outcome of a format request.
On success it carries the canonically-formatted text. On any failure path — unparseable input, error-recovered tree, no clean subtree boundary, or a verify-before-replace mismatch — it carries a human-readable reason and the caller’s original bytes are left unchanged (the formatter never performs a partial rewrite, project-instructions §I).
Variants§
Formatted(String)
Formatting succeeded; the canonical text is enclosed.
NoOp
Formatting was declined; the document is unchanged. reason explains why
(suitable for a non-blocking notice).
Implementations§
Trait Implementations§
Source§impl Clone for FormatResult
impl Clone for FormatResult
Source§fn clone(&self) -> FormatResult
fn clone(&self) -> FormatResult
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 FormatResult
impl Debug for FormatResult
impl Eq for FormatResult
Source§impl PartialEq for FormatResult
impl PartialEq for FormatResult
impl StructuralPartialEq for FormatResult
Auto Trait Implementations§
impl Freeze for FormatResult
impl RefUnwindSafe for FormatResult
impl Send for FormatResult
impl Sync for FormatResult
impl Unpin for FormatResult
impl UnsafeUnpin for FormatResult
impl UnwindSafe for FormatResult
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