atrium_api/com/atproto/identity/
refresh_identity.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.identity.refreshIdentity` namespace.
3pub const NSID: &str = "com.atproto.identity.refreshIdentity";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7    pub identifier: crate::types::string::AtIdentifier,
8}
9pub type Input = crate::types::Object<InputData>;
10pub type Output = crate::com::atproto::identity::defs::IdentityInfo;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(tag = "error", content = "message")]
13pub enum Error {
14    ///The resolution process confirmed that the handle does not resolve to any DID.
15    HandleNotFound(Option<String>),
16    ///The DID resolution process confirmed that there is no current DID.
17    DidNotFound(Option<String>),
18    ///The DID previously existed, but has been deactivated.
19    DidDeactivated(Option<String>),
20}
21impl std::fmt::Display for Error {
22    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
23        match self {
24            Error::HandleNotFound(msg) => {
25                write!(_f, "HandleNotFound")?;
26                if let Some(msg) = msg {
27                    write!(_f, ": {msg}")?;
28                }
29            }
30            Error::DidNotFound(msg) => {
31                write!(_f, "DidNotFound")?;
32                if let Some(msg) = msg {
33                    write!(_f, ": {msg}")?;
34                }
35            }
36            Error::DidDeactivated(msg) => {
37                write!(_f, "DidDeactivated")?;
38                if let Some(msg) = msg {
39                    write!(_f, ": {msg}")?;
40                }
41            }
42        }
43        Ok(())
44    }
45}