Struct term_transcript::Transcript [−][src]
pub struct Transcript<Out: TermOutput = Captured> { /* fields omitted */ }
Expand description
Transcript of a user interacting with the terminal.
Implementations
pub fn from_inputs<Cmd: SpawnShell>(
options: &mut ShellOptions<Cmd>,
inputs: impl IntoIterator<Item = UserInput>
) -> Result<Self>
pub fn from_inputs<Cmd: SpawnShell>(
options: &mut ShellOptions<Cmd>,
inputs: impl IntoIterator<Item = UserInput>
) -> Result<Self>
Constructs a transcript from the sequence of given user input
s.
The inputs are executed in the shell specified in options
. A single shell is shared
among all commands.
Errors
- Returns an error if spawning the shell or any operations with it fail (such as reading stdout / stderr, or writing commands to stdin), or if the shell exits before all commands are executed.
Captures stdout / stderr of the provided command
and adds it to Self::interactions()
.
The command
is spawned with closed stdin. This method blocks until the command exits.
The method succeeds regardless of the exit status of the command
.
Errors
- Returns an error if spawning the
command
or any operations with it fail (such as reading stdout / stderr).
This is supported on crate feature test
only.
This is supported on crate feature
test
only.Parses a transcript from the provided reader
, which should point to an SVG XML tree
produced by Template::render()
(possibly within a larger document).
Errors
- Returns an error if the input cannot be parsed, usually because it was not produced
by
Template::render()
.
Returns interactions in this transcript.
Trait Implementations
Auto Trait Implementations
impl<Out> RefUnwindSafe for Transcript<Out> where
Out: RefUnwindSafe,
impl<Out> Send for Transcript<Out>
impl<Out> Sync for Transcript<Out>
impl<Out> Unpin for Transcript<Out> where
Out: Unpin,
impl<Out> UnwindSafe for Transcript<Out> where
Out: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more