#[non_exhaustive]pub enum ClangFormatStyle {
Chromium,
Default,
File,
GNU,
Google,
Llvm,
Microsoft,
Mozilla,
WebKit,
Custom(String),
}
Expand description
Describes the style to pass to clang-format
This list is created from https://clang.llvm.org/docs/ClangFormatStyleOptions.html#basedonstyle
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Chromium
A style complying with Chromium’s style guide
Default
Use the default clang-format style
File
clang-format will try to find the .clang-format file located in the closest parent directory of the current directory.
GNU
A style complying with the GNU coding standards
Since clang-format 11
A style complying with Google’s C++ style guide
Llvm
A style complying with the LLVM coding standards
Microsoft
A style complying with Microsoft’s style guide
Since clang-format 9
Mozilla
A style complying with Mozilla’s style guide
WebKit
A style complying with WebKit’s style guide
Custom(String)
Specify a custom input to the --style
argument of clang-format
§Example
let style = ClangFormatStyle::Custom("{ BasedOnStyle: Mozilla, IndentWidth: 8 }".to_string());
Trait Implementations§
Source§impl Debug for ClangFormatStyle
impl Debug for ClangFormatStyle
Source§impl PartialEq for ClangFormatStyle
impl PartialEq for ClangFormatStyle
impl StructuralPartialEq for ClangFormatStyle
Auto Trait Implementations§
impl Freeze for ClangFormatStyle
impl RefUnwindSafe for ClangFormatStyle
impl Send for ClangFormatStyle
impl Sync for ClangFormatStyle
impl Unpin for ClangFormatStyle
impl UnwindSafe for ClangFormatStyle
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