pub enum FormatIntent {
Indent,
Reflow,
Reformat,
}Expand description
Which of the three formatting jobs a range wants done.
Separate values rather than one “format”, because they are not
substitutable and the failure directions differ: an indent that
reflows is destructive, a reformatter asked to reflow prose
mostly does nothing at all. docs/dev/architecture/text-reflow.md
§2 has the table.
Each intent names one ProviderChain option
(format.indent / format.reflow / format.reformat) and one
or more verbs.
Variants§
Indent
Leading whitespace only — =.
Reflow
Line breaks within a paragraph — gq / gw.
Reformat
Anything the formatter likes — :format, g=, format-on-save.
Implementations§
Trait Implementations§
Source§impl Clone for FormatIntent
impl Clone for FormatIntent
Source§fn clone(&self) -> FormatIntent
fn clone(&self) -> FormatIntent
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 moreimpl Copy for FormatIntent
Source§impl Debug for FormatIntent
impl Debug for FormatIntent
Source§impl Default for FormatIntent
impl Default for FormatIntent
Source§fn default() -> FormatIntent
fn default() -> FormatIntent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FormatIntent
impl<'de> Deserialize<'de> for FormatIntent
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 FormatIntent
Source§impl PartialEq for FormatIntent
impl PartialEq for FormatIntent
Source§impl Serialize for FormatIntent
impl Serialize for FormatIntent
impl StructuralPartialEq for FormatIntent
Auto Trait Implementations§
impl Freeze for FormatIntent
impl RefUnwindSafe for FormatIntent
impl Send for FormatIntent
impl Sync for FormatIntent
impl Unpin for FormatIntent
impl UnsafeUnpin for FormatIntent
impl UnwindSafe for FormatIntent
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.