pub struct ReporterSet { /* private fields */ }Expand description
Multiplexes events to multiple reporters.
Implementations§
Source§impl ReporterSet
impl ReporterSet
pub fn new(reporters: Vec<Box<dyn Reporter>>) -> Self
Sourcepub fn add(&mut self, reporter: Box<dyn Reporter>)
pub fn add(&mut self, reporter: Box<dyn Reporter>)
Append an additional reporter (e.g., NAPI ResultCollector).
Sourcepub fn replace(&mut self, reporters: Vec<Box<dyn Reporter>>)
pub fn replace(&mut self, reporters: Vec<Box<dyn Reporter>>)
Replace all reporters with a new set.
pub async fn emit(&mut self, event: &ReporterEvent)
pub async fn finalize(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReporterSet
impl !RefUnwindSafe for ReporterSet
impl Send for ReporterSet
impl Sync for ReporterSet
impl Unpin for ReporterSet
impl UnsafeUnpin for ReporterSet
impl !UnwindSafe for ReporterSet
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