atrium_api/com/atproto/identity/
resolve_handle.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.identity.resolveHandle` namespace.
3pub const NSID: &str = "com.atproto.identity.resolveHandle";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7    ///The handle to resolve.
8    pub handle: crate::types::string::Handle,
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    pub did: crate::types::string::Did,
15}
16pub type Output = crate::types::Object<OutputData>;
17#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
18#[serde(tag = "error", content = "message")]
19pub enum Error {
20    ///The resolution process confirmed that the handle does not resolve to any DID.
21    HandleNotFound(Option<String>),
22}
23impl std::fmt::Display for Error {
24    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
25        match self {
26            Error::HandleNotFound(msg) => {
27                write!(_f, "HandleNotFound")?;
28                if let Some(msg) = msg {
29                    write!(_f, ": {msg}")?;
30                }
31            }
32        }
33        Ok(())
34    }
35}