atrium_api/com/atproto/server/
reset_password.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.server.resetPassword` namespace.
3pub const NSID: &str = "com.atproto.server.resetPassword";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    pub password: String,
8    pub token: String,
9}
10pub type Input = crate::types::Object<InputData>;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(tag = "error", content = "message")]
13pub enum Error {
14    ExpiredToken(Option<String>),
15    InvalidToken(Option<String>),
16}
17impl std::fmt::Display for Error {
18    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
19        match self {
20            Error::ExpiredToken(msg) => {
21                write!(_f, "ExpiredToken")?;
22                if let Some(msg) = msg {
23                    write!(_f, ": {msg}")?;
24                }
25            }
26            Error::InvalidToken(msg) => {
27                write!(_f, "InvalidToken")?;
28                if let Some(msg) = msg {
29                    write!(_f, ": {msg}")?;
30                }
31            }
32        }
33        Ok(())
34    }
35}