shrike 0.1.1

AT Protocol library for Rust
Documentation
// Code generated by lexgen. DO NOT EDIT.

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerUpdateEmailInput {
    pub email: String,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub email_auth_factor: Option<bool>,
    /// Requires a token from com.atproto.sever.requestEmailUpdate if the account's email has been confirmed.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub token: Option<String>,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// ServerUpdateEmail — Update an account's email.
pub async fn server_update_email(
    client: &crate::xrpc::Client,
    input: &ServerUpdateEmailInput,
) -> Result<(), crate::xrpc::Error> {
    let _: serde_json::Value = client
        .procedure("com.atproto.server.updateEmail", input)
        .await?;
    Ok(())
}