Skip to main content

rustenium_cdp_definitions/browser_protocol/autofill/
events.rs

1use serde::{Deserialize, Serialize};
2#[doc = "Emitted when an address form is filled.\n[addressFormFilled](https://chromedevtools.github.io/devtools-protocol/tot/Autofill/#event-addressFormFilled)"]
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct AddressFormFilledParams {
5    #[doc = "Information about the fields that were filled"]
6    #[serde(rename = "filledFields")]
7    #[serde(skip_serializing_if = "Vec::is_empty")]
8    pub filled_fields: Vec<super::types::FilledField>,
9    #[doc = "An UI representation of the address used to fill the form.\nConsists of a 2D array where each child represents an address/profile line."]
10    #[serde(rename = "addressUi")]
11    pub address_ui: super::types::AddressUi,
12}
13#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
14pub enum AddressFormFilledMethod {
15    #[serde(rename = "Autofill.addressFormFilled")]
16    AddressFormFilled,
17}
18#[doc = "Emitted when an address form is filled.\n[addressFormFilled](https://chromedevtools.github.io/devtools-protocol/tot/Autofill/#event-addressFormFilled)"]
19#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
20pub struct AddressFormFilled {
21    pub method: AddressFormFilledMethod,
22    pub params: AddressFormFilledParams,
23}
24impl AddressFormFilled {
25    pub const IDENTIFIER: &'static str = "Autofill.addressFormFilled";
26    pub fn identifier(&self) -> &'static str {
27        Self::IDENTIFIER
28    }
29}
30group_enum ! (AutofillEvents { AddressFormFilled (AddressFormFilled) } + identifiable);