pub enum HostEvent {
TabCreated {
tab: u16,
opener: Option<u16>,
url: String,
request: Option<u64>,
},
TabClosed {
tab: u16,
},
FileDialog {
id: u64,
tab: u16,
multiple: bool,
},
JsDialog {
tab: u16,
dialog: String,
message: String,
state: JsDialogState,
},
Download {
tab: u16,
name: String,
path: String,
size: u64,
},
Recording {
started: bool,
seconds: u64,
bytes: u64,
capped: bool,
error: Option<String>,
},
}Expand description
One thing the host needs the server to route.
Variants§
TabCreated
A tab the host created: the page the server asked for, or the popup a
page opened under opener.
Fields
TabClosed
A tab the host closed.
FileDialog
A page’s file chooser: the client’s picker answers with the files’ bytes, and the host is handed server-local paths.
JsDialog
A page’s JavaScript dialog. The host holds it until it is answered:
a shown line is followed by answered when the agent’s answer
arrives, or by closed when the page takes the dialog away itself,
and by nothing until one of those.
Download
A download finished on the server: the tab it started from, the file’s name, its path beside the profile, and how many bytes it holds.
Recording
A recording answered: started says whether the writer opened, and a
later event with it false carries how the take ended.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for HostEvent
impl<'de> Deserialize<'de> for HostEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for HostEvent
impl StructuralPartialEq for HostEvent
Auto Trait Implementations§
impl Freeze for HostEvent
impl RefUnwindSafe for HostEvent
impl Send for HostEvent
impl Sync for HostEvent
impl Unpin for HostEvent
impl UnsafeUnpin for HostEvent
impl UnwindSafe for HostEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.