pub struct StreamHandler;
Expand description
Stream handler utilities
Implementations§
Source§impl StreamHandler
impl StreamHandler
Sourcepub fn print() -> impl FnMut(OutputLine)
pub fn print() -> impl FnMut(OutputLine)
Print output lines to stdout/stderr
Sourcepub fn tee<F>(
handler: F,
) -> impl FnMut(OutputLine) -> (Vec<String>, Vec<String>)where
F: FnMut(&OutputLine),
pub fn tee<F>(
handler: F,
) -> impl FnMut(OutputLine) -> (Vec<String>, Vec<String>)where
F: FnMut(&OutputLine),
Collect output while also calling another handler
Sourcepub fn filter(pattern: String) -> impl FnMut(OutputLine) -> Option<String>
pub fn filter(pattern: String) -> impl FnMut(OutputLine) -> Option<String>
Filter lines by pattern
Sourcepub fn with_prefix(prefix: String) -> impl FnMut(OutputLine)
pub fn with_prefix(prefix: String) -> impl FnMut(OutputLine)
Log output lines with a prefix
Auto Trait Implementations§
impl Freeze for StreamHandler
impl RefUnwindSafe for StreamHandler
impl Send for StreamHandler
impl Sync for StreamHandler
impl Unpin for StreamHandler
impl UnwindSafe for StreamHandler
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