pub struct Transcript {
pub metadata: TranscriptMetadata,
pub events: Vec<TranscriptEvent>,
}Expand description
A complete transcript.
Fields§
§metadata: TranscriptMetadataMetadata.
events: Vec<TranscriptEvent>Events.
Implementations§
Source§impl Transcript
impl Transcript
Sourcepub const fn new(metadata: TranscriptMetadata) -> Self
pub const fn new(metadata: TranscriptMetadata) -> Self
Create a new transcript.
Sourcepub fn push(&mut self, event: TranscriptEvent)
pub fn push(&mut self, event: TranscriptEvent)
Add an event.
Sourcepub fn output_text(&self) -> String
pub fn output_text(&self) -> String
Get all output as a string.
Sourcepub fn input_text(&self) -> String
pub fn input_text(&self) -> String
Get all input as a string.
Sourcepub fn filter(&self, event_type: EventType) -> Vec<&TranscriptEvent>
pub fn filter(&self, event_type: EventType) -> Vec<&TranscriptEvent>
Filter events by type.
Trait Implementations§
Source§impl Clone for Transcript
impl Clone for Transcript
Source§fn clone(&self) -> Transcript
fn clone(&self) -> Transcript
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Transcript
impl RefUnwindSafe for Transcript
impl Send for Transcript
impl Sync for Transcript
impl Unpin for Transcript
impl UnwindSafe for Transcript
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