pub struct AppState {
pub agent: AgentSession,
pub operations: OperationManager,
pub recordings: RecordingManager,
/* private fields */
}Fields§
§agent: AgentSession§operations: OperationManager§recordings: RecordingManagerImplementations§
Source§impl AppState
impl AppState
pub fn new() -> Self
pub fn set_browser(&mut self, browser: Browser)
pub fn take_browser(&mut self) -> Option<Arc<Browser>>
pub fn is_launched(&self) -> bool
pub fn browser(&self) -> Result<&Arc<Browser>, ServerError>
pub fn insert_page(&mut self, id: String, page: Page)
pub fn remove_page(&mut self, id: &str) -> Option<Page>
Sourcepub fn start_cloudflare_watcher(
&mut self,
interval: Duration,
timeout: Duration,
)
pub fn start_cloudflare_watcher( &mut self, interval: Duration, timeout: Duration, )
Solve full-page Cloudflare challenges in every tab until the browser is cleaned up.
pub fn page(&self, id: &str) -> Result<&Page, ServerError>
pub async fn reconcile_pages(&mut self) -> Result<Vec<TabInfo>, ServerError>
pub async fn cleanup_browser(&mut self) -> Result<(), ServerError>
pub fn pages(&self) -> impl Iterator<Item = &Page>
pub fn clear_pages(&mut self)
pub fn mark_shutdown(&mut self)
pub fn should_shutdown(&self) -> bool
pub async fn shutdown(&mut self) -> Result<(), ServerError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AppState
impl !UnwindSafe for AppState
impl Freeze for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
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