pub struct FormatOptions {
pub style: String,
pub ignore_format: Option<Vec<String>>,
}Expand description
A struct to describe the CLI’s clang-format options.
Fields§
§style: StringThe style rules to use.
- Set this to
fileto have clang-format use the closest relative .clang-format file. Same as passing no value to this option. - Set this to a blank string (
'') to disable using clang-format entirely.
[!NOTE] If this is not a blank string, then it is also passed to clang-tidy (if
--tidy_checksis not-*). This is done to ensure suggestions from both clang-tidy and clang-format are consistent.
ignore_format: Option<Vec<String>>Similar to --ignore but applied
exclusively to files analyzed by clang-format.
Trait Implementations§
Source§impl Clone for FormatOptions
impl Clone for FormatOptions
Source§fn clone(&self) -> FormatOptions
fn clone(&self) -> FormatOptions
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 moreAuto Trait Implementations§
impl Freeze for FormatOptions
impl RefUnwindSafe for FormatOptions
impl Send for FormatOptions
impl Sync for FormatOptions
impl Unpin for FormatOptions
impl UnsafeUnpin for FormatOptions
impl UnwindSafe for FormatOptions
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