atrium_api/com/atproto/sync/
get_host_status.rs1pub const NSID: &str = "com.atproto.sync.getHostStatus";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {
7 pub hostname: String,
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 #[serde(skip_serializing_if = "core::option::Option::is_none")]
16 pub account_count: core::option::Option<i64>,
17 pub hostname: String,
18 #[serde(skip_serializing_if = "core::option::Option::is_none")]
20 pub seq: core::option::Option<i64>,
21 #[serde(skip_serializing_if = "core::option::Option::is_none")]
22 pub status: core::option::Option<crate::com::atproto::sync::defs::HostStatus>,
23}
24pub type Output = crate::types::Object<OutputData>;
25#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
26#[serde(tag = "error", content = "message")]
27pub enum Error {
28 HostNotFound(Option<String>),
29}
30impl std::fmt::Display for Error {
31 fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
32 match self {
33 Error::HostNotFound(msg) => {
34 write!(_f, "HostNotFound")?;
35 if let Some(msg) = msg {
36 write!(_f, ": {msg}")?;
37 }
38 }
39 }
40 Ok(())
41 }
42}