pub enum Format {
Human,
Json,
Sarif,
Github,
Markdown,
Junit,
Gitlab,
Agent,
}Variants§
Implementations§
Source§impl Format
impl Format
Sourcepub fn write(self, report: &Report, w: &mut dyn Write) -> Result<()>
pub fn write(self, report: &Report, w: &mut dyn Write) -> Result<()>
Write a check-report. Convenience wrapper that uses default
HumanOptions (Unicode glyphs, no hyperlinks). Callers
that care about glyph fallback or hyperlink support — i.e.
the CLI — should use Format::write_with_options.
Sourcepub fn write_with_options(
self,
report: &Report,
w: &mut dyn Write,
opts: HumanOptions,
) -> Result<()>
pub fn write_with_options( self, report: &Report, w: &mut dyn Write, opts: HumanOptions, ) -> Result<()>
Like Format::write, but with explicit rendering options.
Only the Human format inspects opts; the others ignore it.
Sourcepub fn write_fix(self, report: &FixReport, w: &mut dyn Write) -> Result<()>
pub fn write_fix(self, report: &FixReport, w: &mut dyn Write) -> Result<()>
Write a fix-report. Human, Json, and Markdown have
dedicated renderers; SARIF, GitHub annotations, JUnit,
and GitLab Code Quality describe findings, not
remediations, so they fall back to the human formatter
for fix reports.
Sourcepub fn write_fix_with_options(
self,
report: &FixReport,
w: &mut dyn Write,
opts: HumanOptions,
) -> Result<()>
pub fn write_fix_with_options( self, report: &FixReport, w: &mut dyn Write, opts: HumanOptions, ) -> Result<()>
Like Format::write_fix, but with explicit rendering options.
Trait Implementations§
impl Copy for Format
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more