Struct clang::diagnostic::DiagnosticFormatter
source · [−]pub struct DiagnosticFormatter<'tu> { /* private fields */ }
Expand description
Builds formatted strings from diagnostics.
Implementations
sourceimpl<'tu> DiagnosticFormatter<'tu>
impl<'tu> DiagnosticFormatter<'tu>
sourcepub fn source_location(
&mut self,
source_location: bool
) -> &mut DiagnosticFormatter<'tu>
pub fn source_location(
&mut self,
source_location: bool
) -> &mut DiagnosticFormatter<'tu>
Sets whether the diagnostic text will be prefixed by the file and line of the source location the diagnostic indicates. This prefix may also contain column and/or source range information.
sourcepub fn column(&mut self, column: bool) -> &mut DiagnosticFormatter<'tu>
pub fn column(&mut self, column: bool) -> &mut DiagnosticFormatter<'tu>
Sets whether the column will be included in the source location prefix.
sourcepub fn source_ranges(
&mut self,
source_ranges: bool
) -> &mut DiagnosticFormatter<'tu>
pub fn source_ranges(
&mut self,
source_ranges: bool
) -> &mut DiagnosticFormatter<'tu>
Sets whether the source ranges will be included to the source location prefix.
sourcepub fn option(&mut self, option: bool) -> &mut DiagnosticFormatter<'tu>
pub fn option(&mut self, option: bool) -> &mut DiagnosticFormatter<'tu>
Sets whether the option associated with the diagnostic (e.g., -Wconversion
) will be
placed in brackets after the diagnostic text if there is such an option.
sourcepub fn category_id(
&mut self,
category_id: bool
) -> &mut DiagnosticFormatter<'tu>
pub fn category_id(
&mut self,
category_id: bool
) -> &mut DiagnosticFormatter<'tu>
Sets whether the category number associated with the diagnostic will be placed in brackets after the diagnostic text if there is such a category number.
sourcepub fn category_name(
&mut self,
category_name: bool
) -> &mut DiagnosticFormatter<'tu>
pub fn category_name(
&mut self,
category_name: bool
) -> &mut DiagnosticFormatter<'tu>
Sets whether the category name associated with the diagnostic will be placed in brackets after the diagnostic text if there is such a category name.
sourceimpl<'tu> DiagnosticFormatter<'tu>
impl<'tu> DiagnosticFormatter<'tu>
Trait Implementations
sourceimpl<'tu> Clone for DiagnosticFormatter<'tu>
impl<'tu> Clone for DiagnosticFormatter<'tu>
sourcefn clone(&self) -> DiagnosticFormatter<'tu>
fn clone(&self) -> DiagnosticFormatter<'tu>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'tu> RefUnwindSafe for DiagnosticFormatter<'tu>
impl<'tu> !Send for DiagnosticFormatter<'tu>
impl<'tu> !Sync for DiagnosticFormatter<'tu>
impl<'tu> Unpin for DiagnosticFormatter<'tu>
impl<'tu> UnwindSafe for DiagnosticFormatter<'tu>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more