pub struct GithubReporter { /* private fields */ }Expand description
GitHub Actions reporter. Wraps a delegate (typically the terminal
reporter) and additionally emits
::error file=...,line=...,title=...::message lines so failures
show up as inline annotations on the PR.
The delegate is preserved so users get human-readable output AND
CI annotations from the same --reporter github flag.
Implementations§
Source§impl GithubReporter
impl GithubReporter
Sourcepub fn new(delegate: Box<dyn Reporter>) -> Self
pub fn new(delegate: Box<dyn Reporter>) -> Self
Wrap a delegate reporter. enabled is read from the
GITHUB_ACTIONS env var at construction time — outside of CI
the reporter is a transparent passthrough so local runs aren’t
polluted with annotation lines.
Sourcepub fn with_enabled(self, enabled: bool) -> Self
pub fn with_enabled(self, enabled: bool) -> Self
Force the annotations on/off — for tests.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GithubReporter
impl !RefUnwindSafe for GithubReporter
impl Send for GithubReporter
impl Sync for GithubReporter
impl Unpin for GithubReporter
impl UnsafeUnpin for GithubReporter
impl !UnwindSafe for GithubReporter
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> 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