atrium_api/com/atproto/identity/
resolve_did.rs

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