bitwarden_core/auth/login/response/two_factor/
email.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize, Debug, JsonSchema)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct Email {
    /// The email to request a 2fa TOTP for
    pub email: String,
}

impl From<crate::auth::api::response::two_factor_provider_data::email::Email> for Email {
    fn from(api: crate::auth::api::response::two_factor_provider_data::email::Email) -> Self {
        Self { email: api.email }
    }
}