pub struct PopupFeed { /* private fields */ }Expand description
See Engine::popup_feed. Carries dialogs too: they need the same
off-thread path, since the page’s script is blocked until answered.
Implementations§
Source§impl PopupFeed
impl PopupFeed
Sourcepub fn next_dialog_id(&self) -> u64
pub fn next_dialog_id(&self) -> u64
A fresh dialog id, open until Self::settle closes it.
Sourcepub fn answer(&self, id: u64, answer: DialogAnswer) -> bool
pub fn answer(&self, id: u64, answer: DialogAnswer) -> bool
Answer dialog id, from any thread; the engine applies it on its
next check (within a few milliseconds). False when id is not
open: unknown, already answered, or dismissed for timing out.
Sourcepub fn settle(&self, id: u64, expired: bool) -> Option<Option<DialogAnswer>>
pub fn settle(&self, id: u64, expired: bool) -> Option<Option<DialogAnswer>>
The engine’s check on dialog id. None while it waits; once it
has an answer, or expired with none (then Some(None): dismiss),
the dialog closes and later answers are refused.
pub fn push(&self, e: PopupEvent)
Sourcepub fn drain(&self) -> Vec<PopupEvent>
pub fn drain(&self) -> Vec<PopupEvent>
Events since the last drain, oldest first.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PopupFeed
impl Forget for PopupFeed
impl Move for PopupFeed
impl RefUnwindSafe for PopupFeed
impl Send for PopupFeed
impl Sync for PopupFeed
impl Unpin for PopupFeed
impl UnsafeUnpin for PopupFeed
impl UnwindSafe for PopupFeed
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