pub struct DialogLog { /* private fields */ }Expand description
Shared, cloneable handle to the dialog + download capture buffer.
Implementations§
Source§impl DialogLog
impl DialogLog
pub fn new() -> Self
Sourcepub async fn dialogs(&self) -> Vec<CapturedDialog>
pub async fn dialogs(&self) -> Vec<CapturedDialog>
All captured dialogs, oldest first.
Sourcepub async fn downloads(&self) -> Vec<CapturedDownload>
pub async fn downloads(&self) -> Vec<CapturedDownload>
All captured downloads, oldest first.
Sourcepub async fn open_dialogs(&self) -> Vec<CapturedDialog>
pub async fn open_dialogs(&self) -> Vec<CapturedDialog>
Dialogs that are still open (no close event yet), the set the agent can
answer with crate::Page::handle_user_prompt.
Sourcepub async fn last_dialog(&self) -> Option<CapturedDialog>
pub async fn last_dialog(&self) -> Option<CapturedDialog>
The most recently opened dialog, if any.
Sourcepub async fn dialog_count(&self) -> usize
pub async fn dialog_count(&self) -> usize
Number of captured dialogs.
Sourcepub async fn ingest_opened(&self, evt: &UserPromptOpened)
pub async fn ingest_opened(&self, evt: &UserPromptOpened)
Record a userPromptOpened event.
Sourcepub async fn ingest_closed(&self, evt: &UserPromptClosed)
pub async fn ingest_closed(&self, evt: &UserPromptClosed)
Record a userPromptClosed event, finalizing the matching open dialog
(most-recent open prompt in the same context). Falls back to a standalone
record if no open prompt is found (e.g. log started mid-prompt).
Sourcepub async fn ingest_download_begin(&self, evt: &DownloadWillBegin)
pub async fn ingest_download_begin(&self, evt: &DownloadWillBegin)
Record a downloadWillBegin event.
Sourcepub async fn ingest_download_end(&self, evt: &DownloadEnd)
pub async fn ingest_download_end(&self, evt: &DownloadEnd)
Record a downloadEnd event, finalizing the matching in-flight download
(most-recent will-begin for the same URL/context).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DialogLog
impl !UnwindSafe for DialogLog
impl Freeze for DialogLog
impl Send for DialogLog
impl Sync for DialogLog
impl Unpin for DialogLog
impl UnsafeUnpin for DialogLog
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more