pub struct CommandTranscript<'context> { /* private fields */ }Expand description
Publishes a contained command’s output lines onto an activity’s transcript.
Built for one command execution and passed to
run_cancellable_command as its
observer. On a context with no live transcript seam — every isolated unit
test, and any activity whose host installed none — emitting is the documented
no-op that ActivityContext::emit_event already is, so a command runs
exactly as it did before.
Implementations§
Source§impl<'context> CommandTranscript<'context>
impl<'context> CommandTranscript<'context>
Sourcepub fn new(context: &'context ActivityContext) -> Self
pub fn new(context: &'context ActivityContext) -> Self
Build a transcript publisher for the command context is executing.
Sourcepub fn for_body_line(
context: &'context ActivityContext,
position: usize,
total: usize,
) -> Self
pub fn for_body_line( context: &'context ActivityContext, position: usize, total: usize, ) -> Self
Build a transcript publisher for ONE line of a declared command’s body,
whose events say which line they came from: command stdout (line 2 of 5).
position is one-based, counted the way the body’s failures count it,
so a reader comparing a failure sentence against the transcript is
comparing the same numbers.
Trait Implementations§
Source§impl CommandOutputObserver for CommandTranscript<'_>
impl CommandOutputObserver for CommandTranscript<'_>
Source§fn on_line(&self, stream: CommandStream, line: &str)
fn on_line(&self, stream: CommandStream, line: &str)
stream.Auto Trait Implementations§
impl<'context> !Freeze for CommandTranscript<'context>
impl<'context> RefUnwindSafe for CommandTranscript<'context>
impl<'context> Send for CommandTranscript<'context>
impl<'context> Sync for CommandTranscript<'context>
impl<'context> Unpin for CommandTranscript<'context>
impl<'context> UnsafeUnpin for CommandTranscript<'context>
impl<'context> UnwindSafe for CommandTranscript<'context>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request