pub struct Output { /* private fields */ }Expand description
One run’s voice.
Implementations§
Source§impl Output
impl Output
pub fn new(jsonl: bool) -> Self
Sourcepub fn through(host: impl Fn(Stream, &str) + Send + Sync + 'static) -> Self
pub fn through(host: impl Fn(Stream, &str) + Send + Sync + 'static) -> Self
Prose handed to host, line by line, instead of written to the
terminal.
For wsb github: wsb owns its stream, and under its --jsonl a line
written past it would be the one line in the run that is not a record.
pub fn is_jsonl(&self) -> bool
Sourcepub fn emit(&self, record: Record)
pub fn emit(&self, record: Record)
A record: one line under --jsonl, nothing otherwise — the prose says
it for a person.
Sourcepub fn say(&self, lines: impl IntoIterator<Item = String>)
pub fn say(&self, lines: impl IntoIterator<Item = String>)
Prose for a person; nothing under --jsonl.
Auto Trait Implementations§
impl !Freeze for Output
impl !RefUnwindSafe for Output
impl !UnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnsafeUnpin for Output
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